constraints Element

Specifies a tasklet output that must be set before an action is enabled in the tasklet user interface. This prevents the user from navigating further in the application without providing the necessary information. A tasklet output is identified by a state key that is assigned by an <outputMapping> element.

For more information on constraints and requiring user input to a tasklet, see Overview of Requiring User Input to Tasklets in Microsoft Dynamics Mobile Orchestration Guide online.

userRole Element

    orchestrations Element

        orchestration Element

             actions Element

                 open Element

                     constraints Element

                 exitOrchestration Element

                     constraints Element

                 exitTasklet Element

                     constraints Element

                 next Element

                     constraints Element

                 previous Element

                     constraints Element

             tasklets Element

                 tasklet Element

                     constraints Element

                     actions Element

                         open Element

                             constraints Element

                         next Element

                             constraints Element

                         previous Element

                             constraints Element

                         exitTasklet Element

                             constraints Element

    tasklets Element

        tasklet Element

            constraints Element


<constraints>
  <required stateKey="stateKey name" />
</constraints>

The following sections describe attributes, child elements, and parent elements.

Attributes

None.

Child Elements

Element Description

required Element

Required element.

Specifies the state key that is assigned to the tasklet output that must be set to enable and action.

Parent Elements

Element Description

exitOrchestration Element

An action that closes an orchestration.

exitTasklet Element

An action that closes a tasklet.

next Element

An action that opens the tasklet used in the next step of a wizard as defined in the <wizardSteps> element. For more information, see the wizardSteps Element.

open Element

An action on a tasklet or orchestration that opens another tasklet or orchestration.

previous Element

An action that opens the tasklet used in the previous step of a wizard as defined in the <wizardSteps> element.

tasklet Element

Defines a tasklet.

The required tasklet output value will not necessarily be used as input to the tasklet that opens as a result of the action or any other tasklet in the orchestration. It can simply be a requirement for moving on in the application.

The following is an example of a wizard that consists of three tasklets to create a new customer. The example uses the <constraints> element to require that a credit limit is set in the second step of the wizard before moving on to the third step for setting up a contact person.

<orchestration name="NewCustomerWizard" text="New Customer">
  <confirmClose text="The customer data will be lost. Are you sure you want to close?" />
  <requestDocument name="CreateCustomer" stamps="1" text="Create a customer">
    <requiredRequests>
      <request name="CustomerDetails"/>
      <request name="CreditLimit"/>
      <request name="ContactDetails"/>
    </requiredRequests>
  </requestDocument>
  <wizardSteps>
    <wizardStep tasklet="CustomerDetails" />
    <wizardStep tasklet="CreditLimit" />
    <wizardStep tasklet="ContactDetails" />
  </wizardSteps>
  <actions>
    <exitOrchestration priority="-1" text="Cancel" submitRequestDocument="false"  result="Cancel"/>
  </actions>
  <tasklets>
    <tasklet name="CustomerDetails" text="Customer Details" type="CustomerDetailTasklet. CustomerDetailTasklet, CustomerDetailTasklet ">
      <outputMappings>
        <outputMapping propertyName="CustomerType" stateKey="CustomerType"/>
        <outputMapping propertyName="CustomerName" stateKey="CustomerName"/>
      </outputMappings>
      <actions>
        <next priority="2" text="Next" validate="true"/>
      </actions>
    </tasklet>
    <tasklet name="CreditLimit" text="Credit Limit" type="CustomerCreditLimitDetailTasklet. CustomerCreditLimitDetailTasklet, CustomerCreditLimitDetailTasklet ">
      <outputMappings>
        <outputMapping propertyName="CreditLimit" stateKey="CreditLimit"/>
      </outputMappings>
      <inputMappings>
        <inputMapping propertyName="CustomerType" stateKey="CustomerType"/>
        <inputMapping propertyName="CustomerName" stateKey="CustomerName"/>
      </inputMappings>
      <actions>
        <previous priority="1" text="Previous" />
        <next priority="2" text="Next">
          <constraints>
            <required stateKey="CreditLimit"/>
          </constraints>
        </next>
      </actions>
    </tasklet>
    <tasklet name="ContactDetails" text="Contact Details" type="CustomerContactDetailTasklet.CustomerContactDetailTasklet, CustomerContactDetailTasklet">
      <inputMappings>
        <inputMapping propertyName="CustomerName" stateKey="CustomerName"/>
      </inputMappings>
      <actions>
        <previous priority="1" text="Previous"/>
        <exitOrchestration priority="2" text="Finish" submitRequestDocument="true"  result="OK"/>
      </actions>
    </tasklet>
  </tasklets>
</orchestration>

The constraint is set on the tasklet output parameter with the stateKey named CreditLimit.

Required

No

Max. occurrences

1 within the parent element

Namespace

schemas.microsoft.com/Dynamics/Mobile/2007/04/Flow

Schema Name

UserRole Schema

Validation File

Orchestration.xsd

Can be Empty

Yes

Community Additions

ADD
Show: