Parameter Evaluation

The evaluation attribute specifies where you get an argument from. The location or source of the argument value is completely divorced from the usage of the value.

Therefore, the parameter value can come from anywhere, as long as it ends up with a valid value:

  • constant
    The constant value is typed directly into the workflow definition.
    <Parameter direction=”in|out” type=”any” eval=”constant” name=”InternalName”>VALUE</Parameter>
  • variable
    The workflow maintains a “workflow context” which stores all evaluated variables. Any of these variables can be accessed by specifying the variable name.
    <Parameter direction=”in” type=”any” eval=”variable” name=”InternalName”>VariableName</Parameter>
  • rule
    The rule parameter executes a Business Process Rule, whose name is specified in the source attribute. The document that is passed in is used as the source document for any xpath evaluations specified in the Business Process Rule.
    <Parameter direction=”in” type=”any” eval=”rule” source=”Business Process Rule” name=”InternalName”>DocumentVariable</Parameter>
  • xpath
    The xpath evaluation runs an xpath into the document specified in the tag. The source is the xpath to execute.
    <Parameter direction=”in” type=”any” eval=”xpath” source=”/mlXml/blah” name=”InternalName”>DocumentVariable</Parameter>
  • property
    The property evaluation executes a get method on the specified object.
    <Parameter direction=”in” type=”any” eval=”property” name=”InternalName”>ObjectVariable.Method</Parameter>
    <Parameter direction="in" eval="property" type="string" name="File">ItemAddModifyDoc.FileName</Parameter>

    The second example executes the method getFileName on the object stored in the variable ItemAddModifyDoc. Note that the “get” is suffixed to the method specified in the parameter. This evaluation method should be used with care, since method names are not always guaranteed to remain constant between application versions.

    The specification follows Java Bean standards. The format is objectName.propertyName. The object name should point to a valid object name available in the workflow context, that is, workdoc could point to a valid document. The object should support a method get<propertyName>.

  • lookup

    Two forms of lookup exist:

    <Parameter direction=”in” type=”any” eval=”lookup” name=”InternalName” source=”{domaintype,domainvalue}>DocumentVariable</Parameter>
    <Parameter direction=”in” type=”any” eval=”lookup” name=”InternalName” source=”{{ownerxpath1, ownerxpath2}, domaintype,domainvalue}>DocumentVariable</Parameter>

    This looks up the value in the DOMAINVALUE table for a given ownerID, domaintype, domainvalue. If no ownerxpath is specified, the ID of the context organization is used.

    For example, the following looks up the default Trading Partner for the current organization.

    <Parameter direction="in" name="DefaultBuyer" type="long" eval="lookup" source="{COMPANYBUYERORG,DEFAULTORDERBUYER}">inDoc</Parameter>

    This example looks up a value in the Marketplace (i.e. channel) organization specified in the document header.

    <Parameter direction="in" name="CatalogOutputMap" type="string" eval="lookup" source="{{//MessageHeader[@role='Channel']/Organization/PartyID/DBID}, SYNCHRONIZATION,DEFAULTOUTPUTMAP}">inDoc</Parameter>
  • catalog

    When doing a publish using a “Catalog” definition, you can access the values in that Catalog definition.

    The following list of attributes is accessible from the catalog.

    Attribute Name Description
    Active is it Active (Y,N).
    AddCancel Cancel request to synchronize with integration hub.
    AddCorrection Add Correction request to synchronize with integration hub.
    AddDIsContinue Discontinue request to synchronize with integration hub.
    AddReinstate Add request to synchronize with integration hub which is either discontinued or cancelled.
    BuyerDomain Organization of the trading partner.
    BuyerGln GLN used by the trading partner.
    BuyerID Organization ID of the Trading partner.
    CatalogFileName Name.
    CharSet Character set selected in format specific attributes.
    ClassificationSchemeID Selected Classification scheme ID.
    DefaultCurrency Currency selected in format specific attributes.
    DefaultLanguage Language selected in format specific attributes.
    DeliverCatalog Is catalog delivery requested using specific channel attributes? (Y, N).
    DeliverTo Value selected in DeliverTo.
    DestinationAddress Address selected.
    EditionDescription Synchronization profile description.
    EditionID Selected Synchronization profile ID.
    EditionName Selected Synchronization profile name.
    FileGenerationOption Is File generation requested (Y, N).
    IncludeRejectedRecords Can the Rejected records be Synchronized (Y,N).
    Incremental Is incremental Synchronization requested? (Y, N).
    InitialLoad Is Reload (Initial Load) requested? (Y, N).
    IsXMLFormat Is the output to be generated as an XML file? (True or false)
    ItemAccept Is Accept Requested? (Y, N).
    ItemAdd Is Add Requested? (Y, N).
    ItemCorrection Is Item Correction Requested? (Y, N).
    ItemDelete Is Delete Requested (Y, N).
    ItemPublish Is Publish Requested (Y, N).
    ItemReject Is Reject Requested (Y, N).
    ItemReview Is Review Requested (Y, N).
    ItemSynchronize Is Synchronize Requested (Y, N).
    MarketPlaceID Organization ID of the integration hub.
    MasterCatalogID Repository ID.
    MasterCatalogVersionDateTime Version date to pick the record data.
    ModDate Latest Modification Date.
    ModMemberID Member ID who has last modified the record.
    ModVersion Version of the record.
    OutputMapID Output Map ID.
    PublishCorrection Correction request to the trading partner.
    PublishNew ADD request to a tradingPartner.
    RFCINFlag Request to Supplier for a CIN.
    SelectionType Selection Type: Trading Partner, Trading Partner on a channel or Channel.
    SourceOrganizationID Organization ID of the sender.
    SubsetRuleID Subset Rule selected.
    SupplierDomain Credential domain for sender.
    SupplierGLN Credential value of the sender.
    SupplierGLNID Credential ID (internal ID assigned) of the sender.
    TransferMode Transfer mode: FTP, EMAIL or NONE.
    TransformRulebase Rulebase file name.
    ValidFromDate Valid from.
    ValidToDate Valid to.
    VersionOption Version selection: CONFIRMED, LATEST, ALL.
    XSLTFileName XSLT file uploaded for transform of XML.

    To access one of the parameters, set eval to “catalog” and the source to the Parameter name. For example:

    <Parameter direction="in" name="VersionOption" type="string" eval="catalog" source="VersionOption">inDoc</Parameter>

    When eval is set to catalog, the source is the property of the catalog. Also, the catalog is automatically selected using the indocument. The indocument must be able to resolve the following xpaths:

    • /Message/Body/Document/BusinessDocument/CatalogAction/CatalogActionHeader/CatalogReference[@type='Catalog']/RevisionID/DBID
      /Message/Body/Document/BusinessDocument/CatalogAction/CatalogActionHeader/CatalogReference[@type='Catalog']/RevisionID/Version
  • event Using the event evaluation, you can access attributes of the event. The following is a list of attributes that you can access from the event:
    Attribute Name Description
    For information on valid values of these attributes, refer to UpdateEvent Parameters and Valid Execution Modes
    eventID An ID of the current event.
    eventDescriptor The descriptor for the event.
    eventState The latest state of the event.
    eventStatus The current status of the event.
    processID The current process ID.
    eventDate The start date of an event.
    eventParentID Event ID of the parent event that initiates the current event.
    <Parameter direction="in" type="long" eval="event" name="eventID1" source="eventID"></Parameter>
    		<Parameter direction="in" type="string" eval="event" name="eventDescriptor1" source="eventDescriptor"></Parameter>
    		<Parameter direction="in" type="string" eval="event" name="eventState1" source="eventState"></Parameter>
    		<Parameter direction="in" type="string" eval="event" name="eventStatus1" source="eventStatus"></Parameter>
    		<Parameter direction="in" type="long" eval="event" name="processID1" source="processID"></Parameter>
    		<Parameter direction="in" type="long" eval="event" name="eventParentID1" source="eventParentID"></Parameter>
    
  • userprofile
    Using the userprofile evaluation, you can access attributes from the user profile. The following is a list of attributes that you can access from the userprofile:
    Attribute Name Description
    username The name of a user who initiated an event.
    enterpriseID An ID of an enterprise.
    enterpriseName The name of an enterprise.
    enterpriseInternalName The internal name of an enterprise.
    enterpriseVertical Enterprise vertical.
    organizationID An ID of the organization.
    organizationName The name of an organization.
    organizationType The type of an organization. The types are Retailer, Buyer, or Supplier.
    userID An ID of the user.
    formattedUserName The format is lastname + "," + firstName + " " + middleName.
    <Parameter direction="in" type="string" eval="userprofile" name="userName1" source="userName"></Parameter>
    		<Parameter direction="in" type="long" eval="userprofile" name="enterpriseID1" source="enterpriseID"></Parameter>
    		<Parameter direction="in" type="long" eval="userprofile" name="userID1"  source="userID"></Parameter>
    		<Parameter direction="in" type="long" eval="userprofile" name="organizationID1" source=organizationID"></Parameter>
    		<Parameter direction="in" type="string" eval="userprofile" name="organizationName1" source="organizationName"></Parameter>
    		<Parameter direction="in" type="string" eval="userprofile" name="organizationType1" source="organizationType"></Parameter>
    		<Parameter direction="in" type="string" eval="userprofile" name="enterpriseName1" source="enterpriseName"></Parameter>
    		<Parameter direction="in" type="string" eval="userprofile" name="myvalue" source="myvalue"></Parameter>
    
  • system
    Using the system evaluation, you can access attributes from the instance. The following is a list of attributes that you can access from the system:
    Attribute Name Description
    systemDate Refers to the system date. The recommended data type is string.
    systemTimestamp Refers to the system date and time. The recommended data type is timestamp.
    hostname Refers to the localhost. The recommended data type is string.
    hostAddr Refers to the host IP address. The recommended data type is string.
    nodeID Refers to the ID of the instance. For example, Member 1. The recommended data type is string.
    systemTimestampLong The recommended data type is long.
    homeDir Refers to the MQ_HOME directory. The recommended data type is string.
    commonDir Refers to the MQ_COMMON_DIR directory. The recommended data type is string.
    logDir Refers to the MQ_LOG directory. The recommended data type is string.
    <Parameter direction="in" type="string" eval="system" name="systemDate1" source="systemDate"></Parameter>
    <Parameter direction="in" type="timestamp" eval="system" name="systemTimestamp1" source="systemTimestamp"></Parameter>
    <Parameter direction="in" type="string" eval="system" name="hostname1" source="hostname"></Parameter>
    <Parameter direction="in" type="string" eval="system" name="hostAddr1" source="hostAddr"></Parameter>
    <Parameter direction="in" type="string" eval="system" name="nodeID1" source="nodeID"></Parameter>
    <Parameter direction="in" type="long" eval="system" name="systemTimestampLong1" source="systemTimestampLong"></Parameter>
    <Parameter direction="in" type="string" eval="system" name="mqhome" source="homeDir"></Parameter>
    <Parameter direction="in" type="string" eval="system" name="commondir" source="commonDir"></Parameter>
    <Parameter direction="in" type="string" eval="system" name="mqlog" source="logDir"></Parameter>
    Note: If you do not use the recommended data type, an attempt is made to convert the data type to the specified data type. For example, if the systemDate data type is specified as string, the data is an output as string instead of date.
  • Compute
    Using compute, you can calculate work item expiry date based on the record attributes. You need to define the Rulebase parameter which is used to compute the target expiry date. The formula of the actual expiry date:
    the expiry date = Launch Date(output from rulebase) - RemindBeforeNumberOfDays

    Based on the value of ReminderNumber (reminders generated so far), configure the 'Reminder Setup' rule to retrieve the values of RemindBeforeNumberOfDays and email addresses to send the reminder email. Set the rules in such a way that for each Reminder number, only one value for RemindBeforeNumberOfDays is returned (although any number of email addresses can be returned). When a record is edited or a work item revivified, expiry date is recomputed and updated into the work item. If the recomputed expiry date differs from the old expiry date, the ReminderNumber is set to zero. For more information on compute, refer to the ExpiryType parameter in CreateWorkItem Parameters and Valid Execution Modes.