Example 5 (extending example 4 with an approval step)

The next example extends the previous example with an approval step at the end of the workflow, so the approver can reject the item to all of the previous steps.

Diagram for example 5

images/download/attachments/400049212/SW_Example05.png

Product 360 prerequisites for example 5

Product 360 entity

value

Usergroup

Standardusers

Ui Template

Item approve UI

DQ Channel

Channel 1

DQ Channel

Channel 2

DQ Channel

Channel 3.1

DQ Channel

Channel 3.2

DQ Channel

Channel 4

Explanation of the steps example 5

Step

Description

0

Check whether item is already in this workflow

1

Run DQ check "Channel 1" if fail ==>put the item into the task "My task 1"

2

Run DQ check "Channel 2" if fail ==>put the item into the task "My task 2"

3.1

Run DQ check "Channel 3.1" if fail ==>put the item into the task "My task 3.1"

3.2

Run DQ check "Channel 3.2" if fail ==>put the item into the task "My task 3.2"

4

Run DQ check "Channel 4" if fail ==>put the item into the task "My task 4"

5.0

Check whether item is already in this workflow.

5

Approve task with rejection options to all previous tasks

StepWorkflow.xml file for example 5

Example 5
<imp:payload xmlns:imp="http://www.informatica.com/schema/ItemMap" contentType="string">
<workflow>
<label>Example Workflow 5</label>
<identifier>Workflow_05</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>
</step>
<step>
<id>1</id>
<entity>Article</entity>
<workflowStatus>My task 1</workflowStatus>
<description>My task 1</description>
<workflowServiceEndpoint>StepWorkflow-Trigger</workflowServiceEndpoint>
<enterStatus>OnDqResults</enterStatus>
<batchSize>500</batchSize>
<userType>userGroup</userType>
<userName>Standardusers</userName>
<uiTemplate>Item approve UI</uiTemplate>
<executeDq>Always</executeDq>
<dqService>ExecuteDqBatch-Process</dqService>
<dqChannel>Channel 1</dqChannel>
<nextStep>STEP:2</nextStep>
</step>
<step>
<id>2</id>
<entity>Article</entity>
<workflowStatus>My task 2</workflowStatus>
<description>My task 2</description>
<workflowServiceEndpoint>StepWorkflow-Trigger</workflowServiceEndpoint>
<enterStatus>OnDqResults</enterStatus>
<batchSize>500</batchSize>
<userType>userGroup</userType>
<userName>Standardusers</userName>
<uiTemplate>Item approve UI</uiTemplate>
<executeDq>Always</executeDq>
<dqService>ExecuteDqBatch-Process</dqService>
<dqChannel>Channel 2</dqChannel>
<nextStep>StepWorkflow_ParallelTasks-Workflow</nextStep>
<parallelStep>3.1</parallelStep>
<parallelStep>3.2</parallelStep>
<parallelNextStep>4</parallelNextStep>
</step>
<step>
<id>3.1</id>
<entity>Article</entity>
<workflowStatus>My task 3.1</workflowStatus>
<description>My task 3.1</description>
<workflowServiceEndpoint>StepWorkflow-Trigger</workflowServiceEndpoint>
<enterStatus>OnDqResults</enterStatus>
<userType>userGroup</userType>
<userName>Standardusers</userName>
<uiTemplate>Item approve UI</uiTemplate>
<executeDq>Always</executeDq>
<dqService>ExecuteDqBatch-Process</dqService>
<dqChannel>Channel 3.1</dqChannel>
<dqFailTrigger>StepWorkflow_ParallelTasks-Finish-1</dqFailTrigger>
<nextTrigger>StepWorkflow_ParallelTasks-Finish-1</nextTrigger>
</step>
<step>
<id>3.2</id>
<entity>Article</entity>
<workflowStatus>My task 3.2</workflowStatus>
<description>My task 3.2</description>
<workflowServiceEndpoint>StepWorkflow-Trigger</workflowServiceEndpoint>
<enterStatus>OnDqResults</enterStatus>
<userType>userGroup</userType>
<userName>Standardusers</userName>
<uiTemplate>Item approve UI</uiTemplate>
<executeDq>Always</executeDq>
<dqService>ExecuteDqBatch-Process</dqService>
<dqChannel>Channel 3.2</dqChannel>
<dqFailTrigger>StepWorkflow_ParallelTasks-Finish-2</dqFailTrigger>
<nextTrigger>StepWorkflow_ParallelTasks-Finish-2</nextTrigger>
</step>
<step>
<id>4</id>
<entity>Article</entity>
<workflowStatus>My task 4</workflowStatus>
<description>My task 4</description>
<workflowServiceEndpoint>StepWorkflow-Trigger</workflowServiceEndpoint>
<enterStatus>OnDqResults</enterStatus>
<batchSize>500</batchSize>
<userType>userGroup</userType>
<userName>Standardusers</userName>
<uiTemplate>Item approve UI</uiTemplate>
<executeDq>Always</executeDq>
<dqService>ExecuteDqBatch-Process</dqService>
<dqChannel>Channel 4</dqChannel>
<nextStep>STEP:5.0</nextStep>
</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>false</singleChoice>
<rejectDecision>
<id>p360.bpm.reject.STEP:1</id>
<label>Reject to task 1</label>
</rejectDecision>
<rejectDecision>
<id>p360.bpm.reject.STEP:2</id>
<label>Reject to task 2</label>
</rejectDecision>
<rejectDecision>
<id>p360.bpm.reject.TRIGGER:3.1</id>
<label>Reject to task 3.1</label>
</rejectDecision>
<rejectDecision>
<id>p360.bpm.reject.TRIGGER:3.2</id>
<label>Reject to task 3.2</label>
</rejectDecision>
<rejectDecision>
<id>p360.bpm.reject.STEP:4</id>
<label>Reject to task 4</label>
</rejectDecision>
</step>
</workflow>
</imp:payload>

Detailed explanation of the steps

Only the differences to the previous example will be explained.

Step 0

Step 0 is an exact copy of the step 0 of the example 4.

Step 1

Step 1 is an exact copy of the step 1 of the example 4.

Step 2

Step 2 is an exact copy of the step 2 of the example 4.

Step 3.1

Step 3.1 is an exact copy of the step 3.1 of the example 4.

Step 3.2

Step 3.2 is an exact copy of the step 3.2 of the example 4.

Step 4

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

Key

Value

Description

...

...

Same keys and values than in the example 4.

nextStep

STEP:5.0

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

Step 5.0

This steps checks only whether the item is already in this workflow. If not the executed next step is 5. If yes the workflow will end to avoid that the item will go to the step 5 (Approve) until it is somewhere else in the workflow.

Key

Value

Description

id

5.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:5

The item will be moved to the step with the identifier 5 if the above DQ fails.

Step 5

This steps checks only whether the item is already in this workflow. If not the executed next step is 5. If yes the workflow will end to avoid that the item will go to the step 5 (Approve) until it is somewhere else in the workflow.

Key

Value

Description

id

5

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

false

This is for Rejects only and determines if you can have more than one choice. ==> The workflow can be rejected to all steps in one decision.

<rejectDecision>id

p360.bpm.reject.STEP:1

Identifier of the 1st reject step.

<rejectDecision>label

Reject to task 1

Label of the 1st rejection. This label will show up in the UI.

<rejectDecision>id

p360.bpm.reject.STEP:2

Identifier of the 2nd reject step.

<rejectDecision>label

Reject to task 2

Label of the 2nd rejection. This label will show up in the UI.

<rejectDecision>id

p360.bpm.reject.TRIGGER:3.1

Identifier of the 3rd reject step. (In this case you have to reject to a trigger!)

<rejectDecision>label

Reject to task 3.1

Label of the 3rd rejection. This label will show up in the UI.

<rejectDecision>id

p360.bpm.reject.TRIGGER:3.2

Identifier of the 4th reject step. (In this case you have to reject to a trigger!)

<rejectDecision>label

Reject to task 3.2

Label of the 4th rejection. This label will show up in the UI.

<rejectDecision>id

p360.bpm.reject.STEP:4

Identifier of the 5th reject step.

<rejectDecision>label

Reject to task 4

Label of the 5th rejection. This label will show up in the UI.