Example 10 (1 Task)

The tenth workflow puts items into a workflow task called “My first task” that is assigned to whatever user is in the field “ArticleLang.Remarks”. It also sends an email to that user. For this workflow task we need 2 steps. The first step checks whether the affected item is already in this workflow, if not it will move to the next step.. The second step puts the item in the task and sends the notification.

Diagram for example 10

images/download/attachments/487621610/ex10-0.png

Explanation of the steps example 10

Step

Description

0

Check whether item is already in this workflow.

1

Put the item into the task "My first task" and emails the user.

Product 360 prerequisites for example 10

Product 360 entity

value

User

The value in “ArticleLang.Remarks” field.

Ui Template

Item approve UI

Info

Whatever user name is in “ArticleLang.Remarks” is user that the task is assigned to. There is a new status added to the workflow with the user name appended to the task name. There is a delimiter “|” between the task name and the user name.

StepWorkflow.xml file for example 10

Example 10
<imp:payload xmlns:imp="http://www.informatica.com/schema/ItemMap" contentType="string">
<workflow>
<label>Example Workflow 10</label>
<identifier>Workflow_10</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>My first task</workflowStatus>
<description>The description of my first workflow task.</description>
<workflowServiceEndpoint>StepWorkflow-Trigger</workflowServiceEndpoint>
<getField>Article.SupplierAID</getField>
<getField>ArticleLang.DescriptionShort(9, "Default Channel")</getField>
<getField>ArticleLang.DescriptionLong(9, "Default Channel")</getField>
<getField>ArticleLog.ModificationDate(HPM)</getField>
<enterStatus>Always</enterStatus>
<notificationService>NotifyUser-Process</notificationService>
<batchSize>500</batchSize>
<userType>user</userType>
<userName>SERVICE:UserTask-Workflow</userName>
<userDescriptor>ArticleLang.Remarks(9, "Default Channel")</userDescriptor>
<includeLabels>true</includeLabels>
<uiTemplate>Item approve UI</uiTemplate>
<executeDq>Never</executeDq>
</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!

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 succeeds.

taskDelimeter

|

The delimiter that goes between the original task name and the user name.

Step 1

This step enters the items in the task called “My first task” and emails the user this task is assigned to.

Key

Value

Description

id

1

Identifier of the step.

entity

Article

Entity container for this workflow.

workflowStatus

My first task

Status name within the Product 360 workflow. ==> Product 360 task name = [Workflow] - [Status] - [Catalog]

description

My first workflow task

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

user

Type of the default assignee of this task. In this case it will be a user.

userName

SERVICE:UserTask-Workflow

The service for the bpel process that will determine the user or usergroup to assign the task to.

updateFieldDescriptor

ArticleLang.Remarks(9, "Default Channel")

The field which stores the user name to assign the task to for dynamic users.

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!

notificationService

NotifyUser-Process

The service for the bpel process that will perform the email service.

includeLabels

true

This will allow us to receive the item number in addition to the item ID.

getField

Several field names

This will get the field values for the items from P360. By default, for NotifyUser, these will be included in an html table in the email.