Example 8 (2 Tasks modifying of fields approval step merge)

The next example extends the example 7 workflow with merging the item(s) after the approval.

Diagram for example 8

images/download/attachments/400049256/SW_Expample08.png

Product 360 prerequisites for example 8

Product 360 entity

value

Usergroup

Standardusers

Ui Template

Item approve UI

Explanation of the steps example 8

Step

Description

0

Check whether item is already in this workflow

1

Put the item into the supplier task "My task 1"

2

Modify the field Article.CurrentStatus to the value 200

3

Put the item into the task "My task 3"

4

Modify the field Article.CurrentStatus to the value 300

5.0

Check whether item is already in this workflow

5

Approve task with rejection options to all previous tasks. If rejected modify the field Article.CurrentStatus to the value 300

6

Modify the field Article.CurrentStatus to the value 400

7

Merge the item

StepWorkflow.xml file for example 8

Example 8
<imp:payload xmlns:imp="http://www.informatica.com/schema/ItemMap" contentType="string">
<workflow>
<label>Example Workflow 8</label>
<identifier>Workflow_08</identifier>
<version>1.0</version>
<step>
<id>0</id>
<entity>Article</entity>
<enterStatus>Never</enterStatus>
<batchSize>500</batchSize>
<executeDq>Always</executeDq>
<dqService>ItemsInWorkflowTasks-Process</dqService>
<dqFailStep>STEP:1</dqFailStep>
<getField>Article.MainSupplier->Party.Name</getField>
</step>
<step>
<id>1</id>
<entity>Article</entity>
<workflowStatus>My task 1</workflowStatus>
<description>My task 1</description>
<workflowServiceEndpoint>StepWorkflow-Trigger</workflowServiceEndpoint>
<enterStatus>Always</enterStatus>
<batchSize>500</batchSize>
<userType>supplier</userType>
<uiTemplate>Item approve UI</uiTemplate>
<executeDq>Never</executeDq>
<getField>Article.CurrentStatus</getField>
<nextStep>STEP:2</nextStep>
<nextStep>STEP:3</nextStep>
</step>
<step>
<id>2</id>
<entity>Article</entity>
<updateFieldDescriptor>Article.CurrentStatus</updateFieldDescriptor>
<updateFieldValue>200</updateFieldValue>
</step>
<step>
<id>3</id>
<entity>Article</entity>
<workflowStatus>My task 2</workflowStatus>
<description>My task 2</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>
<nextStep>STEP:4</nextStep>
<nextStep>STEP:5.0</nextStep>
</step>
<step>
<id>4</id>
<entity>Article</entity>
<updateFieldDescriptor>Article.CurrentStatus</updateFieldDescriptor>
<updateFieldValue>300</updateFieldValue>
</step>
<step>
<id>5.0</id>
<entity>Article</entity>
<enterStatus>Never</enterStatus>
<batchSize>500</batchSize>
<executeDq>Always</executeDq>
<dqService>ItemsInWorkflowTasks-Process</dqService>
<dqFailStep>STEP:5</dqFailStep>
</step>
<step>
<id>5</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>true</singleChoice>
<rejectDecision>
<id>p360.bpm.reject.STEP:1</id>
<label>Reject to task 1</label>
</rejectDecision>
<rejectDecision>
<id>p360.bpm.reject.STEP:3</id>
<label>Reject to task 2</label>
</rejectDecision>
<rejectFieldDescriptor>Article.CurrentStatus</rejectFieldDescriptor>
<rejectFieldValue>100</rejectFieldValue>
<nextStep>STEP:6</nextStep>
</step>
<step>
<id>6</id>
<workflowServiceEndpoint>StepWorkflow-Trigger</workflowServiceEndpoint>
<entity>Article</entity>
<updateFieldDescriptor>Article.CurrentStatus</updateFieldDescriptor>
<updateFieldValue>400</updateFieldValue>
<nextStep>STEP:7</nextStep>
</step>
<step>
<id>7</id>
<workflowServiceEndpoint>StepWorkflow-Trigger</workflowServiceEndpoint>
<entity>Article</entity>
<mergeProfile>profile_no_images</mergeProfile>
<nextStep>MergeItems-Process</nextStep>
</step>
</workflow>
</imp:payload>

Detailed explanation of the steps

Step 0 - Step 5

These steps are exact copy of the example 7.

Step 6

Step 6 is nearly the same as the step 5 of the example above. Only the differences are shown in the next table.

Key

Value

Description

...

...

Same keys and values than in the example above.

nextStep

STEP:7

Identifier of the next step, The item will be moved to the next step, when this step is finished.

Step 7

Step 7 will execute the merge.

Key

Value

Description

id

7

workflowServiceEndpoint

StepWorkflow-Trigger

entity

Article

mergeProfile

profile_no_images

Profile of the merge process. There are 2 profiles within the standard workflow package. They are located in the folder profiles merge-profile of the StepWorkflow project. If you need additonal profiles you have to add them to the project with your BPM Designer,

nextStep

MergeItems-Process

This bpel prcoess allows you to merge items into the Master Catalog.