Open Source Hardware · Open Source Software · Technology · Uncategorized

Define/Assign Custom Paylod for your BPEL Human Task


When you create a BPEL Human Task, the payload type is not specified by default. You can specify a simple type from the drop down on the “Data” menu item on the BPEL Task Editor page.

In a BPEL Task, see which menu item to select ("Data") to change the payload type

By default if you have not assigned a menu item then your “payload” element is not defined in your BPEL Task’s Schema. The BPEL Human Task references the “ApproveTaskWorkflowTask” schema, which has an element called “Payload” which is imported from “ApproveTaskPayload.xsd” schema definition file.


When the payload is not defined the structure is show below in the subsequent images…. so in the “ApproveTaskWorkflowTask.xsd” we have an empty payload

…and in the “ApproveTaskPayload.xsd” we have

I created a simple schema for my Approval Process where the top-level element is “TimeSheet” (which as a list of TimeSheetDays, which have details in them).  I wanted to use this schema as a payload….

I will use this in the BPEL Human Task by choosing “Other Payload” in my “Data” menu item

Select the schema you want …

Assign a name to refer to this payload type by … you should see the Task -> Payload -> <name-you-gave> as the structure.

End result … your Task has your user defined type for a payload. Now you can add data to this from a BPEL flow or an external call (convert your Human Task to an invoke-able “Composite with Service Bindings” by selecting that option when creating the task).

To use the data you do the following:

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s