Example 12 (2 Triggers and Merge with Results)
The twelfth workflow puts items into a workflow task called “Contact external team”. The first step checks whether the affected item is already in this workflow, if not it will be put into the task. The second step puts the items in the “Contact external team” task . The workflow then stops until it is triggered again by an import, export, or entity change. Once the workflow is triggered again, it moves to an approval task. Approved items go to the next step and rejected items end the workflow. In the last step, the affected items merge. Because it is set up as a dq, any items that fail to merge go into a “Failed to Merge” task.
Diagram for example 12
Explanation of the steps example 12
Step |
Description |
0 |
Check whether item is already in this workflow. |
1 |
Put the item into the task "Contact external team". |
2nd Trigger |
This step is triggered by an import complete, export started, or an entity changed. It then moves to Step 3. |
3 |
Put the item into an approval task. Items that are rejected end the workflow. Ones that are approved move to step Merge. |
Merge |
Merge the items as a DQ. if fail ==>put the item into the task “Failed to Merge” and send an email. |
Product 360 prerequisites for example 12
Product 360 entity |
value |
Usergroup |
Standardusers |
Ui Template |
Item approve UI |
Info
Standarduser is the Identifier of the Usergroup. This workflow stops after step one until a new trigger is generated for the step “2nd Trigger”. This workflow also features a merge that runs as a DQ. The items will merge, but if any fail, they will enter a merge failed task.
StepWorkflow.xml file for example 12
<
imp
:payload
xmlns:imp
=
"http://www.informatica.com/schema/ItemMap"
contentType
=
"string"
>
<
workflow
>
<
label
>Example Workflow 12</
label
>
<
identifier
>Workflow_12</
identifier
>
<
version
>1.0</
version
>
<
taskUserDelimiter
>|</
taskUserDelimiter
>
<
step
>
<
id
>0</
id
>
<
entity
>Article</
entity
>
<
enterStatus
>Never</
enterStatus
>
<
batchSize
>500</
batchSize
>
<
executeDq
>Always</
executeDq
>
<
dqService
>ItemsInWorkflowTasks-Process</
dqService
>
<
dqFailStep
>STEP:1</
dqFailStep
>
</
step
>
<
step
>
<
id
>1</
id
>
<
entity
>Article</
entity
>
<
workflowStatus
>Contact external team</
workflowStatus
>
<
description
>Contact external team and finish the task. Once the import is completed the workflow will pick up where it left off.</
description
>
<
workflowServiceEndpoint
>StepWorkflow-Trigger</
workflowServiceEndpoint
>
<
enterStatus
>Always</
enterStatus
>
<
userType
>userGroup</
userType
>
<
userName
>Standardusers</
userName
>
<
uiTemplate
>Item approve UI</
uiTemplate
>
<
executeDq
>Never</
executeDq
>
</
step
>
<
step
>
<
id
>2nd Trigger</
id
>
<
entity
>Article</
entity
>
<
triggerConfiguration
>Example12_ImportCompleted_2nd</
triggerConfiguration
>
<
triggerConfiguration
>Example12_ExportStarted_2nd</
triggerConfiguration
>
<
triggerConfiguration
>Example12_EntityChange_2nd</
triggerConfiguration
>
<
nextStep
>STEP:3</
nextStep
>
</
step
>
<
step
>
<
id
>3</
id
>
<
entity
>Article</
entity
>
<
workflowStatus
>Approve</
workflowStatus
>
<
description
>Approval</
description
>
<
workflowServiceEndpoint
>StepWorkflow-Trigger</
workflowServiceEndpoint
>
<
enterStatus
>Always</
enterStatus
>
<
batchSize
>500</
batchSize
>
<
userType
>userGroup</
userType
>
<
userName
>Standardusers</
userName
>
<
uiTemplate
>Item approve UI</
uiTemplate
>
<
executeDq
>Never</
executeDq
>
<
rejectTrigger
>StepWorkflow_ParallelTasks-Reject</
rejectTrigger
>
<
singleChoice
>false</
singleChoice
>
<
rejectDecision
>
<
id
>p360.bpm.reject</
id
>
<
label
>Reject</
label
>
</
rejectDecision
>
<
nextStep
>WorkflowWait-Process</
nextStep
>
<
wait
>PT5S</
wait
>
<
nextStep
>STEP:Merge</
nextStep
>
</
step
>
<
step
>
<
id
>Merge</
id
>
<
entity
>Article</
entity
>
<
workflowStatus
>Failed to Merge</
workflowStatus
>
<
description
>These items failed to merge.</
description
>
<
workflowServiceEndpoint
>StepWorkflow-Trigger</
workflowServiceEndpoint
>
<
enterStatus
>OnDqResults</
enterStatus
>
<
userType
>user</
userType
>
<
userName
>pim</
userName
>
<
uiTemplate
>Item approve UI</
uiTemplate
>
<
executeDq
>Always</
executeDq
>
<
dqService
>MergeItemsResults-Process</
dqService
>
<
mergeProfile
>profile_no_images</
mergeProfile
>
<
dqFailStep
>NotifyUser-Process</
dqFailStep
>
</
step
>
</
workflow
>
</
imp
:payload>
Detailed explanation of the steps
Step 0
This step checks only whether the item is already in this workflow. If not the executed next step is 1. If yes the workflow will end because there is no next step defined.
Key |
Value |
Description |
id |
0 |
Identifier of the step. |
entity |
Article |
Entity container for this workflow. |
enterStatus |
Never |
The circumstances when an item should enter a status (task). In this case never! |
batchSize |
500 |
Batch size to use with trigger batching. |
dqService |
ItemsInWorkflowTasks-Process |
This DQ service is an additional bpel inside the StepWorkflow which checks whether the item is already inside this workflow or not. |
dqFailStep |
STEP:1 |
The item will be moved to the step with the identifier 1 if the above dq fails. |
Step 1
This step puts the affected items in a task. If the task is finished, the workflow will stop.
Key |
Value |
Description |
id |
1 |
Identifier of the step. |
entity |
Article |
Entity container for this workflow. |
workflowStatus |
Contact external team |
Status name within the Product 360 workflow. ==> Product 360 task name = [Workflow] - [Status] - [Catalog] |
description |
Contact external team and finish the task. Once the import is completed the workflow will pick up where it left off. |
Description of the status. |
workflowServiceEndpoint |
StepWorkflow-Trigger |
This is the service name of the partner link. This name is defined in the process deployment descriptor of the workflow. |
enterStatus |
Always |
The circumstances when an item should enter a status (task). In this case always! |
userType |
userGroup |
Type of the default assignee of this task. In this case it will be a usergroup. |
userName |
Standardusers |
Name/Identifier of the Default assignee of the task. ==> The item will be assigned to the usergroup "Standardusers". |
uiTemplate |
Item approve UI |
This is the default UI of the task. |
executeDq |
Never |
The circumstances when a DQ should be run. In this case never! |
Step 2nd Trigger
Once this step is triggered, it just moves to the next step.
Key |
Value |
Description |
id |
2nd Trigger |
Identifier of the step. |
entity |
Article |
Entity container for this workflow. |
triggerConfiguration |
Example12_ImportCompleted_2nd Example12_ExportStarted_2nd Example12_EntityChange_2nd |
The 3 different trigger configurations that can trigger the step |
nextStep |
STEP:3 |
The item will be moved to the step. |
Step 3
This is the approval step that moves to Merge if approved while workflow ends for rejected items.
Key |
Value |
Description |
id |
3 |
Identifier of the step. |
entity |
Article |
Entity container for this workflow. |
workflowStatus |
Approve |
Status name within the Product 360 workflow. ==> Product 360 task name = [Workflow] - [Status] - [Catalog] |
description |
Approval |
Description of the status. |
workflowServiceEndpoint |
StepWorkflow-Trigger |
This is the service name of the partner link. This name is defined in the process deployment descriptor of the workflow. |
enterStatus |
Always |
The circumstances when an item should enter a status (task). In this case always! |
batchSize |
500 |
Batch size to use with trigger batching. |
userType |
userGroup |
Type of the default assignee of this task. In this case it will be a usergroup. |
userName |
Standardusers |
Name/Identifier of the Default assignee of the task. ==> The item will be assigned to the usergroup "Standardusers". |
uiTemplate |
Item approve UI |
This is the default UI of the task. |
executeDq |
Never |
The circumstances when a DQ should be run. In this case never! |
rejectTrigger |
StepWorkflow_ParallelTasks-Reject |
Endpoint for the reject trigger of parallel states (tasks). |
singleChoice |
true |
This is for Rejects only and determines if you can have more than one choice. ==> The workflow can be rejected to only one step, |
<rejectDecision>id |
p360.bpm.reject |
Identifier of the reject step. Since none is added, it will not go to a task. |
<rejectDecision>label |
Reject |
Label of the rejection. This label will show up in the UI. |
nextStep |
WorkflowWait-Process |
This step will wait and then go to the next nextStep. |
wait |
PT5S |
Standard duration notation. This is 5 seconds. |
nextStep |
STEP:Merge |
Identifier of the next step, The item will be moved to the next step, when this step is approved. |
Step Merge
This step does the merge through a DQ process. The items will merge, but if any fail, they will enter a merge failed task.
Key |
Value |
Description |
id |
Merge |
Identifier of the step. |
entity |
Article |
Entity container for this workflow. |
workflowStatus |
Failed to Merge |
Status name within the Product 360 workflow. ==> Product 360 task name = [Workflow] - [Status] - [Catalog] |
description |
These items failed to merge. |
Description of the status. |
workflowServiceEndpoint |
StepWorkflow-Trigger |
This is the service name of the partner link. This name is defined in the process deployment descriptor of the workflow. |
enterStatus |
OnDqResults |
The circumstances when an item should enter a status (task). In this case only when DQ check will fail! |
userType |
user |
Type of the default assignee of this task. In this case it will be a user. |
userName |
pim |
Name/Identifier of the Default assignee of the task. ==> The item will be assigned to the user "pim". |
uiTemplate |
Item approve UI |
This is the default UI of the task. |
executeDq |
Always |
The circumstances when a DQ should be run. In this case always! |
dqService |
MergeItemsResults-Process |
The service name of the process that will be handle the processing of the DQ. In this case, it will merge the items and return Success for those that do not have issues and Failed for those that do. |
dqFailStep |
NotifyUser-Process |
This will send an email containing all items that failed to merge if any did. |
nextTrigger |
StepWorkflow_ParallelTasks-Finish-1 |
This is another service name of the partner link of the parallel tasks. It will be called if the item will leave this step. |