Process Design
Different types of documents can be added to work items using XTRAC Workbench. These attachments remain with the work item and any child work items until the attachment is removed. Attachments can also be removed using XTRAC Workbench. If an attachment is removed then all subsequent work items will be created without the attachment.
XTRAC work items are represented in Process Design by a User Task. Process execution does not directly support attachment removal. If an attachment is removed using XTRAC Workbench during the execution of a process, then the Process execution engine will recognize that the attachment has been removed and will create new User Tasks without the attachment. The exact timings of when the Process execution engine will recognize that the attachment has been removed will depend on the process design.
These scenarios demonstrate a few examples of how the Process execution engine handles a removed attachment.
Scenarios
Remove an Attachment
A Process user task instantiates a new work item that has to be completed before advancing to the next activity. Attachments can be added or removed using XTRAC Workbench before the work item is completed. It is important to keep this in mind when designing a process flow so that attachments are added and removed at the correct time. This scenario demonstrates a simple Process model that adds and removes an attachment.
In the example below:
|
1.
|
User task 1 starts and a work item is created. |
|
2.
|
An operator in Workbench adds an attachment to work item 1. |
|
3.
|
User task 2 starts and a work item is created with the attachment. |
|
4.
|
An operator removes the attachment from work item 2. |
|
5.
|
User task 3 starts and work item 3 is created without an attachment. |
The interactions between process and Workflow are shown in detail in the table below.
|
Process |
Workflow |
1. |
Process starts. |
|
2. |
User task 1 starts. |
Work item 1 is created. |
3. |
|
Operator attaches a document to work item 1. |
4. |
User task 1 ends. |
|
5. |
User task 2 starts. |
Work item 2 is created with an attachment. |
6. |
|
Operator removes the attachment from work item 2.
|
7. |
User task 2 ends. |
|
8. |
User task 3 starts. |
Work item 3 is created without an attachment. |
|
Process ends.
|
Remove Attachment in a Call Activity (non-family attachments)
A Call Activity is a reusable process that is called from a parent model. The Call Activity is independent from the parent so all actions that happen while Process execution is in the Call Activity will not be known to the parent model until the Call Activity has finished. If a work item attachment is removed during a Call Activity, then the parent model will not know that the attachment has been removed until the process execution has returned to the parent. In the example below:
|
1.
|
User task 1 starts and work item 1 is created. |
|
2.
|
In Workbench, an operator attaches a document to work item 1. |
|
3.
|
Operator clears the option, "Attach to all family members". |
|
4.
|
A parallel process starts user task 2 and a call activity. |
|
5.
|
Work item 2 is created with an attachment. |
The call activity starts a separate process.
|
6.
|
User task 7 starts and work item 7 is created with an attachment. |
|
7.
|
User task 8 starts and work item 8 is created with an attachment. |
|
8.
|
An operator removes the attachment from work item 8. |
|
9.
|
User task 9 starts and work item 9 is created without an attachment. |
|
10.
|
The call activity ends and reconciles with the parent process. This means that the parent process is notified that the attachment has been removed. |
If user task 2 finishes before the call activity is completed, user task 3 will start and work item 3 will have the attachment because the parent process has not been notified that the attachment has been removed.
The interactions between the parent process, call activity and Workflow are shown in detail in the table below.
Parent Process |
Call Activity |
Workflow |
|
Process starts.
|
1. |
User task 1 starts. |
|
Work item 1 is created. |
2. |
. |
. |
Operator attaches a document and clears option, "Attach to all family members". |
3. |
User task 1 ends. |
|
Work item 1 ends. |
4. |
User task 2 starts. |
|
Work item 2 is created with an attachment. |
5. |
Call activity starts. |
|
|
6. |
|
User task 7 starts. |
Work item 7 is created with an attachment. |
7. |
|
User task 7 ends. |
Work item 7 ends. |
8. |
|
User task 8 starts. |
Work item 8 is created with an attachment. |
9. |
|
|
Operator removes the attachment. |
10. |
|
The attachment is removed from the call activity. |
|
11. |
|
User task 8 ends. |
Work item 8 ends. |
12. |
|
User task 9 starts. |
Work item 9 is created without an attachment. |
13. |
|
User task 9 ends. |
Work item 9 ends. |
|
Call Activity finishes before user task 2 ends
|
User task 2 finishes before Call Activity is done
|
|
Parent Process |
Call Activity |
Workflow |
Parent Process |
Call Activity
|
Workflow |
14. |
|
User task 7 starts. |
Work item 7 is created with an attachment. |
User task 2 ends.
|
-- |
Work item 2 ends. |
15. |
|
User task 7 ends.
|
Work item 7 ends.
|
User task 3 starts. |
-- |
Work item 3 is created with an attachment. |
16. |
|
User task 8 starts. |
Work item 8 is created with an attachment. |
User task 3 ends. |
|
|
17. |
|
|
Operator removes the attachment from work item 8.
|
User task 4 starts. |
|
|
18. |
|
User task 9 starts. |
Work item 9 is created, no attachment. |
User task 4 ends.
|
|
|
19. |
|
User task 9 ends. |
Work item 9 ends.
|
User Task 5 starts. |
|
|
20.
|
|
Call activity ends. |
|
User Task 5 ends. |
|
|
21. |
Call activity is reconciled with parent process. |
|
|
User Task 6 starts. |
|
|
22. |
User task 2 ends. |
|
Work item 2 ends. |
User Task 6 ends. |
Call activity finishes and is reconciled with parent process.
|
Work item 3 ends. |
23. |
User task 3 and 5 starts. |
|
Work item 3 and 5 are created without an attachment. |
|
|
Work item 4 is created without an attachment.
|
24. |
User task 3 and 5 ends. |
|
Work item 3 and 5 ends. |
|
|
Work item 4 ends. |
25. |
User task 4 and 6 starts. |
|
Work item 4 and 6 are created without an attachment. |
|
|
Work item 5 is created without an attachment. |
26. |
User task 4 and 6 ends. |
|
Work item 4 and 6 ends. |
|
|
Work item 5 ends. |
27. |
|
|
|
|
|
Work item 6 is created without an attachment. |
28. |
|
|
|
|
|
Work item 6 ends. |
|
Process end
|
Remove Attachment in a Call Activity (family attachments)
An XTRAC Workbench user can add an attachment to a work item with the option “Attach to all family members” checked or unchecked. This option will affect Process execution in the following ways. When this option is checked, the attachment is immediately added to all work items in the "family". If an attachment is added to a work item created in a Call Activity with this option checked, then the parent is also updated immediately.
When an attachment is removed from a work item that was attached with this option checked then the attachment will be removed from that work item only but the attachment remains with the other work items or processes, including the parent process.
|
2.
|
A parallel process starts user task 2 and starts a call activity. |
The call activity starts a separate process.
|
3.
|
User task 7 starts and work item 7 is created. |
|
4.
|
In Workbench, an operator attaches a document to work item 7. |
|
5.
|
Operator selects the option, "Attach to all family members". 
|
|
6.
|
The current user tasks in the parent process will receive the attachment, e.g. user task 2, 3 or 4. |
|
7.
|
User task 8 starts and work item 8 is created with the attachment. |
|
8.
|
In Workbench, an operator removes the attachment from work item 8. |
|
9.
|
User task 9 starts and work item 9 is created without an attachment. |
|
10.
|
The call activity ends and reconciles with the parent process. This means that the parent process is notified that the attachment has been removed.
|
Depending on when the call activity ends and reconciles will depend on which user task: 3 or 4, will have the attachment removed.
The interactions between the parent process, call activity and Workflow are shown in detail in the table below.
Parent Process |
Call Activity |
Workflow |
|
Process starts
|
1. |
User task 1 starts. |
|
Work item 1 starts. |
2. |
User task 1 ends. |
|
Work item 1 ends. |
4. |
User task 2 starts. |
|
Work item 2 starts. |
5. |
Call activity starts. |
User task 7 starts. |
Work item 7 starts. |
6. |
|
|
Operator attaches a document to work item 7 and selects option, "Attach to all family members".
Document is attached to user task 2.
|
8. |
|
User task 7 ends. |
Work item 7 ends.
|
9. |
User task 2 ends. |
User task 8 starts. |
Work item 8 is created with an attachment.
Work item 2 ends.
|
11. |
User task 3 starts. |
|
Operator removes attachment from work item 8.
Work item 3 starts with an attachment.
|
12. |
User task 3 ends. |
User task 8 ends. |
work item 3 ends. |
13. |
User task 4 starts. |
User task 9 starts. |
Work item 9 is created without an attachment.
Work item 4 starts with an attachment.
|
14. |
|
Call activity ends. |
|
15. |
Call activity reconciles with parent process. |
|
|
|
Process end
|
Recommendations
|
1.
|
For Processes that only require simple attachments, It is recommended to add the “All Attachments” security function and remove the “Family Attachments” security function from the security group. |
|
2.
|
If you decide to include the “Family Attachments” security function, then be sure to review the scenario above titled “Remove Attachments in a Call Activity (family attachments)” and ensure that you fully understand the runtime behaviors of this scenario. |