• 沒有找到結果。

Chapter 4. Changes on Role and Artifact Definitions

4.2 Changes on Artifact Definitions

The artifact agent is an artifact carrier in a workflow instance. All of the artifact definitions, including the artifact formats and the read/write authority settings, are stored in repository. When the process agent requests for an artifact with pre-specified definition, the artifact agent would be instantiated respectively. It then interacts with the process agent to get the routing decision and move to the next site. The artifact agent modifies the carried data after interacting with the proper person agent or the automatic manipulation. Then it reports the result to its process agent and waits for the next routing decision again.

Generally speaking, whenever the static definition in database is altered, the process agent would be notified of this change. Based on the change, the process agent is defined to ask the artifact agent to modify the carried data, or the dynamic definitions, after its current task. The information which an artifact agent carries for modification includes the followings.

1 Artifact identifier: Similar to the workflow identifier, when the static definition of an artifact agent is modified by the administrator, the process agent can find out the target agent right away, according to the artifact’s identifier.

2 The names and the value types of the fields: When some fields of an artifact are renamed, the artifact agent can modify the content carried respectively. When the value types of fields are changed, the artifact agent modifies the data carried.

Based on the status of the workflow instance, the process agent decides whether the artifact agent has to request new value from the person agent or not. For

example, let the social security ID field (and its value type) of the artifact definition be modified as the birthday field (and DATE). When the process agent is notified of this change (instruction), it would make the artifact agent to adapt to the change after finishing the current task. After applying the modification to the data carried, the artifact agent has to request the birth date from the proper person agent.

In the case of adding a field, the attributes of the new field should be well-defined in the static definition. After the artifact agent modified the data carried, the process agent might ask the artifact agent interact with the person agent to get the new field’s value if the artifact agent had passed the site of the person agent. On the other hand, the deletion of a field would be trivial at omitting the deleted field thereafter, and the artifact agent would not reveal it to the later person agents. The careless deletion, however, might cause the contradiction of the process agent. For example, the artifact agent may interact with a person agent which cannot read any data, because all the fields which the person agent can access were deleted previously. To avoid this contradiction, the administrator has to check the whole process definition before deleting a field. If the process definition are modified corresponding to the deletion of the field, such as changing the flow graph of the artifact agent, the process agent might change its dynamic definition as described in 3.3, in addition to notify the artifact agent of the deletion.

3 Read-write authority for each role: The read/write access control for each field of the artifact should be set correctly. These authority settings decide what will be shown or can be done by a person agent. After the changes of the read-write authority settings in the static definitions, the process agent would be notified and thus the artifact agents for the authority. Similar to the change of a role definition,

if the authority setting for a person agent is changed and the process definitions are not modified correspondingly, the artifact agent may become illegal to interact with that person agent. Thus, the workflow process might never be completed. In fact, the case of deletion of a field in previous paragraph is a special case of the change of the read-write authority. If all the person agents involved in this workflow have no authority to access a field, the field seems to be deleted already.

The following is the problem solution to policies described above.

1 Process agent:

i、 In the case that the names and value types are changed.

1 Receive the change instruction from the workflow manager.

2 Decide whether to ask the artifact agent to request for a new value with a WF-Diff algorithm.

3 Halt all artifact agents after their current tasks.

4 Ask the related agents to modify carried artifact contents, and to request for a new value, if needed.

ii、 In the case that the read-write authority for one role is changed.

1 Receive the change instruction from the workflow manager.

2 Halt all artifact agents after their current tasks.

3 Ask the related agents to modify access authority setting.

iii、 In the case that adding a field causes the change on the flow graph.

1 Receive the change instruction and identify the changes on the flow graph from the workflow manager.

2 Decide the modified region and whether to ask the artifact agent to request for a new value with a WF-Diff algorithm.

3 Halt all artifact agents after their current tasks.

4 Ask the related agents to add a field into the artifact content.

5 Manipulate in accordance with the process status:

1 If the artifact agent has not entered the modified region, update its definition of the corresponding flow graph.

2 If the artifact agent had passed the modified region, update its definition of the corresponding flow graph and ask the artifact agent to request for a new value.

3 If the artifact agent is within the modified region, update its definition of the corresponding flow graph, and set itself and the artifact agent to the state before the starting of the modified region.

6 Follow the new flow graph and make the routing decision as normal.

2 Artifact agent:

i、 In the case that the names and value types are changed.

1 Receive the process agent’s halting command after reporting the task’s result.

2 Receive the new content of the artifact and modify the artifact content by the notification.

3 Request the corresponding person agent for a new value by the process agent’s instruction, if needed.

4 Receive the next routing decision and move to the destination site.

ii、 In the case that the read-write authority of a field for one role is changed.

1 Receive the process agent’s halting command after reporting the task’s result.

2 Receive the new authority setting and modify the authority setting of field.

iii、 In the case that adding a field causes the change on the flow graph.

1 Receive the process agent’s halting command after reporting the task’s result.

2 Receive the new content of the artifact and modify the artifact content carried by adding a new field.

3 Request the corresponding person agent for a new value by the process agent’s instruction, if needed.

4 Receive the command of change state and change the artifact’s state to a suitable state, if needed.

5 Receive the next routing decision and move to the destination site.

3 Person agent:

i、 In the case that the names and value types are changed.

1 For those person agents of the sites where the artifact agent had passed, they might be asked for a new value by the artifact agent.

2 For the person agents of other sites, nothing would happen.

ii、 In the case that the read-write authority for one role is changed.

1 The person agent has nothing to do with this case.

iii、 In the case that adding a field causes the change on the flow graph.

1 For the person agents of the sites within the modified region, they might interact with the artifact agent again.

2 For those person agents of the sites where the artifact agent had passed, they might be asked for a value by the artifact agent.

3 For the person agents of other sites, nothing would happen.

相關文件