Table of Contents

Search

  1. Preface
  2. Welcome to Informatica Process Developer
  3. Using Guide Developer for the First Time
  4. Getting Started with Informatica Process Developer
  5. About Interfaces Service References and Local WSDL
  6. Planning Your BPEL Process
  7. Participants
  8. Implementing a BPMN Task or Event in BPEL
  9. Implementing a BPMN Gateway or Control Flow
  10. Using Variables
  11. Attachments
  12. Using Links
  13. Data Manipulation
  14. Compensation
  15. Correlation
  16. What is Correlation
  17. What is a Correlation Set
  18. Creating Message Properties and Property Aliases
  19. Adding a Correlation Set
  20. Deleting a Correlation Set
  21. Adding Correlations to an Activity
  22. Rules for Declaring and Using Correlation Sets
  23. Correlation Sets and Engine-Managed Correlation
  24. Event Handling
  25. Fault Handling
  26. Simulating and Debugging
  27. Deploying Your Processes
  28. BPEL Unit Testing
  29. Creating POJO and XQuery Custom Functions
  30. Custom Service Interactions
  31. Process Exception Management
  32. Creating Reports for Process Server and Central
  33. Business Event Processing
  34. Process Central Forms and Configuration
  35. Building a Process with a System Service
  36. Human Tasks
  37. BPEL Faults and Reports

Designer

Designer

Assign

Assign

Select a FROM Type and then complete the Copy operation by making other appropriate selections. Add, edit, copy, delete, and reorganize Copy operations and scripts for the selected Assign activity.
BPMN Implementation: Script task, None/Start/End throw event
The assign activity updates the content of variables. It updates variables in several ways:
  • Copies data from one variable to another for a
    Copy
    operation
  • Executes a script with a
    Script
    operation without the need for specifying a copy from/to definition
  • Constructs new data using XPath (or other language) expressions and functions
  • Constructs new data using WS-BPEL and other extension functions
You can also use assign to copy endpoint references to and from partner links for dynamic selection of service partners.
If desired, you can validate the value of variables against their XML or WSDL definitions.
Tip:
You can take a shortcut to creating an assign by creating data assignments within a receive, invoke, reply, and people activity. For details, see
Output Variable
.
Required Properties
Optional Properties
Copy
optional attributes:
Keep Source Element Name. See
Validating Variables
Ignore Missing From Data. See Copy Operation with Ignore Missing From Data Attribute.
Name. See
Selecting Activity Labels
 
Join Condition. See
Creating a Join Condition for an Incoming Link
 
Suppress Join Failure. See
Process Properties
 
Comment. See
Adding Comments to a Process
 
Documentation. See
Adding Documentation to a Process
 
Setting Visual Properties and Using Your Own Library of Images
 
Execution State. See
Viewing the Execution State of an Activity or Link
 
Validate. See
Validating Variables
 
Extension Attributes and Extension Elements. See
Declaring Extension Elements and Attributes
.
To add an assign activity to the process:
  1. From the
    Task
    palette, drag a script task to the Process Editor canvas.
    You can add a background color to the script task.
  2. Double-click the assign to open the Operations dialog.
    Alternately, in the Properties view, click in the Value field of the Copy Operations and select the
    Dialog (...) Button
    .
  3. Select
    New Copy
    or
    New Script
    .
  4. For a New Script, the Script Builder opens where you can create an expression to execute. The script operation avoids the need for defining a from/to specification that a copy operation uses.
  5. For a New Copy, in the From section, select a
    Type
    .
    From Type
    Description
    Upon Selection of this Type...
    Expression
    An XPath (or other language) expression to perform computations on variables and properties. Must return a string, number or Boolean.
    You can create the expression with an Expression Builder. For more information, see
    Using the Expression Builder
    Literal
    A constant that conforms to an XML schema definition. The type can be indicated inline using
    xsi:type
    Do one of the following:
    Type in literal value (for example, 100)
    Select the Literal Contents
    Dialog (...) Button
    to open a larger editing area
    Generate literal contents for a complex variable, described in
    Using the XML Data Wizard
    and
    Copy Operation Literal Contents Examples
    .
    Assign a dynamic endpoint reference. See Copy Operation Dynamic Endpoint Reference Example.
    Opaque
    Name representing private application data. Use this option only for an abstract process. For more information, see
    Creating an Executable vs. an Abstract Process
    .
    No other choices are allowed
    Partner
    This selection generates a list of partner links and roles
    Select a partner link and role defining an endpoint reference
    Variable
    A WSDL message variable and optional part name
    A WSDL message property
    XML schema simple type or element
    Select a variable name, and optionally, a part name and query. For more information, see
    Using the Query Builder
    . Queries are allowed only in executable processes.
    Variable Property
    A WSDL message property
    Select a variable name and property
  6. In the To section, select a Type. The To type must be compatible with the From type, as shown.
    This From type
    Must match this To type
    Message-type variable
    Message-type variable with matching type
    XML schema type variable
    A variable containing a schema type
    XML element type variable
    A variable containing the same element
    Literal
    Must have a matching XML schema type
    Expression
    Expression or Variable
    Partnerlink
    partner role
  7. If desired, enable the
    Keep Source Element Name
    check box, applicable only for element-based variables. The source element name is used as the name of the resulting destination element. See
    Element to Element Copy Operation with Keep Source Element Name Attribute
    .
  8. If desired, enable the Ignore Missing From Datacheck box to avoid a selection failure if the source variable is missing optional data. See Copy Operation with Ignore Missing From Data Attribute.
  9. Click
    OK
    . You can add multiple operations to an Assign. They are executed in the order shown in the
    Operations
    dialog and also in the Outline view.
  10. If desired, in the Properties view, set the Validate property to yes to validate all variables used in the assign's Copy operations.
For a shortcut to creating new assigns or adding Copy operations to an existing assign, you can use drag-and-drop features in the Process Variables view. For more information, see
Using Variables in a Copy Operation
.
Copy Operation XML Syntax
<assign validate="yes|no"? standard-attributes> standard-elements (<copy keepSrcElementName="yes|no"? ignoreMissingFromData="yes|no"?> from-spec (see below) to-spec (see below) </copy> | <extensionAssignOperation> ...assign-element-of-other-namespace... </extensionAssignOperation>) + </assign>
From-Spec XML Syntax
The From element can be in one of these forms:
<from variable="BPELVariableName" part="NCName"? <query queryLanguage="anyURI"?>? queryContent </query> /from> <from partnerLink="NCName" endpointReference="myRole|partnerRole"/> <from variable="BPELVariableName" property="QName"/> <from expressionLanguage="anyURI"?>expression</from> <from><literal>literal value</literal></from>
In an abstract process, you can also use:
<from opaque="yes">
Opaque data is private application data that you do not want to expose to your business partners. It is effectively an abstract process placeholder for some real data that you intend to use in an executable process.
To-Spec XML Syntax
The To element can be in one of these forms:
<to variable="BPELVariableName" part="NCName"? <query queryLanguage="anyURI"?>? queryContent </query> /to> <to partnerLink="NCName"/> <to variable="BPELVariableName" property="QName"/> <to expressionLanguage="anyURI"?>expression</to>
Examples
:
Example 1
<assign> <copy> <from>'yes'</from> <to part="accept" variable="approval"/> </copy> </assign> <assign> <copy> <from>$po.lineItem[@prodCode=$myProd]/amt * $exchangeRate </from> <to>$convertedPO.lineItem[@prodCode=$myProd]/amt</to> </copy> </assign>
Example 2: XML for a Script Operation
<bpel:assign> <bpel:extensionAssignOperation> <bpel:documentation>new script operation </bpel:documentation> <ext3:script>abx:createAttachment('request', 'text/plain', abx:base64Encode("Test attachment") )</ext3:script> </bpel:extensionAssignOperation> </bpel:assign>
See also:
  • Tips for Copy Operations
  • Copy Operation Query and Expression Examples
  • Copy Operation Literal Contents Examples
  • Copy Operation Dynamic Endpoint Reference Example
  • Element to Element Copy Operation with Keep Source Element Name Attribute
  • Copy Operation with Ignore Missing From Data Attribute

0 COMMENTS

We’d like to hear from you!