Este contenido no está disponible en el idioma seleccionado.
9.16. Batch-execution and Command Examples
- There is currently no XML schema to support schema validation. This is the basic format. The root element is <batch-execution> and it can contain zero or more commands elements:
<batch-execution> ... </batch-execution>
<batch-execution> ... </batch-execution>Copy to Clipboard Copied! Toggle word wrap Toggle overflow - The insert element features an "out-identifier" attribute so the inserted object will be returned as part of the result payload:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - It's also possible to insert a collection of objects using the <insert-elements> element. This command does not support an out-identifier. The
org.domain.UserClassis just an illustrative user object that XStream would serialize:Copy to Clipboard Copied! Toggle word wrap Toggle overflow - The
<set-global>element sets a global for the session:Copy to Clipboard Copied! Toggle word wrap Toggle overflow <set-global>also supports two other optional attributes:outandout-identifier. A true value for the booleanoutwill add the global to the<batch-execution-results>payload, using the name from theidentifierattribute.out-identifierworks likeoutbut additionally allows you to override the identifier used in the<batch-execution-results>payload:Copy to Clipboard Copied! Toggle word wrap Toggle overflow - There is a
<get-global>element without contents. It only has anout-identifierattribute. There is no need for anoutattribute because retrieving the value is the sole purpose of a<get-global>element:<batch-execution> <get-global identifier='userVar1' /> <get-global identifier='userVar2' out-identifier='alternativeUserVar2'/> </batch-execution>
<batch-execution> <get-global identifier='userVar1' /> <get-global identifier='userVar2' out-identifier='alternativeUserVar2'/> </batch-execution>Copy to Clipboard Copied! Toggle word wrap Toggle overflow - The query command supports both parameter and parameterless queries. The
nameattribute is the name of the query to be called, and theout-identifieris the identifier to be used for the query results in the<execution-results>payload:Copy to Clipboard Copied! Toggle word wrap Toggle overflow - The
<start-process>command accepts optional parameters:Copy to Clipboard Copied! Toggle word wrap Toggle overflow - The signal event command allows you to identify processes:
<signal-event process-instance-id='1' event-type='MyEvent'> <string>MyValue</string> </signal-event>
<signal-event process-instance-id='1' event-type='MyEvent'> <string>MyValue</string> </signal-event>Copy to Clipboard Copied! Toggle word wrap Toggle overflow - The complete work item command notifies users when a process is completed:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - The abort work item command lets you cancel a process while it is running:
<abort-work-item id='21' />
<abort-work-item id='21' />Copy to Clipboard Copied! Toggle word wrap Toggle overflow