Actions, Commands, and Their Results - Web Services - Foundation 23.2 - Foundation 23.2 - Ready - Content Composer - external

Content Composer Web Services

Platform
Content Composer
Product
Web Services
Release
Foundation 23.2
License

A Web service process is essentially defined by its actions. An action can have a predecessor and can require configuration. In addition, an action has a status that provides information on action progress.

The MwsActivityStatus process components in an MWS process serve to represent actions.

Web Service Actions when Using the MWS Standard Process

Action Description
OBJECTSELECTION Object selection
DATASELECTION Data retrieval
COMPLETESTRUCTURE Complete bundle structure, for example, dynamic bundle
CREATEDOCUMENTS Document generation
FORWARD Forward process
PRINTDOCUMENTS Print bundle documents
PRINTANDARCHIVE Pass bundle documents to Odin

This sequence also defines the dependencies between individual actions.

  • Printing is only possible after documents are created.
  • Documents can only be created when it is clear which documents to create.
  • It is only clear which documents are to create after data is retrieved.

In addition to these fixed dependencies between actions, there are other dynamic dependencies that are not always present and, quite frequently, can only be resolved by user interaction.

In other words, in certain cases, actions can only then be executed when the action has been configured.

Dynamic Dependencies

  • Data can only be retrieved when selection parameters are defined.

    The necessity of entering parameters, however, is only then given, when these parameters actually exist.

  • Documents can only be created when their manual variables are set.

    The necessity of entering manual variables, however, is only then given, when manual variables actually exist. This can, of course, change very quickly, depending on which text blocks have been selected.

  • A bundle can only be printed directly when a direct printer is defined.

    The necessity of entering a direct printer, however, is only then given, when direct print is required.

  • A bundle can only be forwarded when either the user and/or a user group to which it is to be forwarded, is defined.

    If one or more of these dynamic dependencies are present, the respective action can only be started when configuration is complete.

    An action is considered configured when the property (refer to Action Property configured) is set accordingly.

    Action properties can be passed in the options (refer to Process Options) on calling the Process_Start or Process_Create functions.

Process Control

The process control of the Web services stipulates that, basically, every action can always be started. If the predecessors to the action to be started have not been executed, the process control tries to start them. The predecessor actions check always starts as the first action of the process.

If, for example, straight after creating a PRINTDOCUMENTS process is started, the process control tries to execute all outstanding actions starting with the first action of the process.

If one of these actions is not configured, a corresponding configuration warning is issued. Otherwise, the action is executed and the next action of the sequence is checked.

The process progresses until the first configuration warning or ends with the execution of the started target action, in this case, PRINTDOCUMENTS.

Error Handling

If manual input is required, starting a command results in error code 6000 being returned.

The MWS stores the command that was originally started, so that it can be continued after the missing information has been entered. On the next command start, the stored command can be re-enabled by the fictional CONTINUE_LAST_ACTION command.

Example Pseudocode

...
res := Process.Process_Start(FSID, FPID, 'PRINT_AND_ARCHIVE', options, resxml);
if res = 6000 then
begin
   ok := LetUserConfigActions(options, resxml);
   if ok then
      res := Process.Process_Start(FSID, FPID, 'CONTINUE_LAST_ACTION', options, resxml);
end;
...

Commands and Their Results

As seen in the last example, the content of the command parameter is not consistent with the name of the process actions.

Apart from the two static commands, SET_PARAMETERS and CONTINUE_LAST_ACTION, the commands are derived from the names of the script execution process blocks contained in the MWS process.

Here, the target activity is set by specifying the command of the first script execution process block, whose object name matches the command passed.

If no such script execution process block is found, a corresponding error is thrown to this effect.

The following list applies to the MWS standard process.

  • SET_PARAMETERS

    This command evaluates and sets the parameters in the options. An action is not started. An empty string is returned if successful.

  • SELECT_OBJECT

    The OBJECTSELECTION action is started. If successful, the result XML is similar to that of the SELECT_DATA command.

    If no bundle is loaded and the corresponding parameters to load the object (bundle) are required, the command returns the error code 6000.

    A description of the structure of the XML can be found in the chapter on Example XML of a Configuration Warning for the Action FORWARD .

  • SELECT_DATA

    The DATASELECTION action (data retrieval) is started. If successful, an XML is returned representing the structure of the bundle.

    This XML corresponds to the result of the Obj_GetStructure procedure if an empty string is passed in the parameter RootRef and the value 1 is passed as the parameter MaxLevel.

    The command returns the error code 6000 when parameters are required for starting the selection.

    In this case, the result XML contains the parameters required.

    A description of the structure of the XML can be found in the chapter on Example XML for SELPARAMS .

  • COMPLETE_STRUCTURE

    The AfterDataRetrieval event is triggered and the respective script (if assigned) is executed.

    The result XML corresponds to that of the SELECT_DATA command.

  • CREATE_DOCUMENTS

    Document creation is started. Here, like for the SELECT_DATA command , the structure of the bundle is returned when successful.

    The command returns the error code 6000 when manual variables are still required.

    In this case, the result XML contains the manual variables required.

    A description of the structure of the XML can be found in the chapter on Example XML for MANVARS.

  • FORWARD_DOCUMENTS

    The FORWARD action is executed. If successful, the result XML is similar to that of the SELECT_DATA command .

    The command returns the error code 6000 when the bundle is blocked (the BlockBundle flag in the assigned AfterCreatingDocuments script is set to true and the current user is the same user who created the process).

    In this case, the result XML contains the parameters required for forwarding.

    A description of the structure of the XML can be found in the chapter on Example XML for SELPARAMS.

  • PRINT_DOCUMENTS

    Executes the PRINTDOCUMENTS action . Prepares transfer to output management.

    If successful, the result XML is similar to that of the command SELECT_DATA.

    The command returns the error code 6000 if not all documents have a valid print definition.

    In this case, the result XML contains the documents whose print definitions are still to be completed by the Obj_SetStructure method.

    More detailed information on the structure of the XML can be found in the chapter on OUTPUTPARAMS.

  • PRINT_AND_ARCHIVE

    Transfer to output management is performed by the odinProcessImport component.

    If successful, the result XML is similar to that of the SELECT_DATA command.

    Otherwise, a corresponding error XML is returned.

  • CONTINUE_LAST_ACTION

    If a command was interrupted by the error code 6000, it can be re-enabled, that means restarted using this fictional command.

    If no stored command is found, a corresponding error XML is returned.