Monday, October 10, 2011

How to specify the workflow to be run and arguments to a workflow from a userform.

How can I specify a specific workflow that should be executed from within a userform?

I would also like to know how to pass in arguments to the specified workflow from
within a userform.
ANSWER:
To specify execution of a specific workflow, from within a userform, you would use
the following syntax:

<Field name='viewOptions.Process'>
  <Expansion>
    <!-- Name of custom workflow goes here -->
    <s>My Custom Create User</s>
  </Expansion>
</Field>

To pass specific arguments into a workflow, you would use the following syntax:

      <!-- The following goes into your userform.
           The variable name after processInputs. can be whatever you desire -->
      <Field name='processInputs.isUserValid'>
        <Expansion>
          <s>true</s>
        </Expansion>
      </Field>

      <!-- The following gets put at the top of the workflow that you
           are passing the argument into -->
      <Variable name='isUserValid' input='true'>
        <Comments>
          Passed from my active sync form
        </Comments>
      </Variable>

Once passed in, the argument can be referenced within the workflow.

No comments:

Post a Comment