/
Pausing/Killing a Workflow or MC Stream

Pausing/Killing a Workflow or MC Stream

Cancel a Single Stream

For RTR for Cancel Single Stream the following parameters are available:

  • ActionType = ‘CANCEL’ (required)

  • StreamName = the name of stream, where cancel steps for single stream will be implemented (required). The exact stream name will be known when the development is complete

  • CancelStreamName = The name of stream to cancel (required)

  • CancelMsgStatId = Message Stat Id of stream to cancel (optional). If empty, all running streams with name CancelStreamName will be cancelled.

<EagleML eaglemlVersion="2-0" eaglemlType="RunTaskRequest" xsi:schemaLocation="http://www.eagleinvsys.com/2011/EagleML-2-0 eagleml-main-2-0.xsd" xsi:type="RunTaskRequest" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.eagleinvsys.com/2011/EagleML-2-0"> <header> <messageId>EA27DCC0ED860BD0</messageId> <sentBy>http://www.eagleinvsys.com/</sentBy> <sendTo>http://www.eagleinvsys.com/eagle_ml-2-0_default_cm_control_message</sendTo> <creationTimestamp>2016-12-15T09:12:28-05:00</creationTimestamp> </header> <taskIdentifier> <correlationId correlationIdScheme="correlationIdScheme">BT142658_SRV20170724101</correlationId> <businessTaskId correlationIdScheme="businessTaskIdScheme">BT142658_SRV20170624</businessTaskId> </taskIdentifier> <taskParameters> <taskParameter> <name>ActionType</name> <dataType>S</dataType> <value>CANCEL</value> </taskParameter> <taskParameter> <name>StreamName</name> <dataType>S</dataType> <value>eagle_ml-2-0_default_cm_control_process</value> </taskParameter> <taskParameter> <name>CancelStreamName</name> <dataType>S</dataType> <value>bt142658_task_translator</value> </taskParameter> <taskParameter> <name>CancelMsgStatId</name> <dataType>S</dataType> <value>2252596</value> </taskParameter> </taskParameters> </EagleML>
  1. Delete processing file from ‘processing’ folder of stream directory (example, ‘/estar/tpe/data/msgcnetr/out/CSV/bt142658_task_translator/processing/’)

  2. Update status of processing MC task and message in msgcenter_dbo.msg_message_stat and msgcenter_dbo.tasks in order to mark them as completed

    update msgcenter_dbo.tasks set status='S', processing_status ='' where batch_id like '%UNIQUE_MASK_OF_PROCESSING_FILE%' escape '\' and STATUS = 'E' and PROCESSING_STATUS='E'
    update msgcenter_dbo.msg_message_stat st set st.status=3, end_processing_time = sysdate where st.file_name  like '%UNIQUE_MASK_OF_PROCESSING_FILE%' escape '\'  and st.end_processing_time is null
  3. Restart MC processor, which processes current file

If this step is not performed, the processor will continue processing file even if the status in msgcenter_dbo.msg_message_stat and msgcenter_dbo.tasks tables was updated.

Cancel a EJM Process

For RTR for Cancel EJM Process the following parameters are available:

  • ActionType = ‘CANCEL’ (required)

  • StreamName = the name of stream, where cancel steps for EJM process will be implemented (required). The exact stream name will be known when the development is complete

  • CancelCorrelationId = Correlation Id of EJM process to cancel (required)

  • CancelStreams = 1 or skipped (optional). If 1, underlying streams executed under EJM process will be cancelled too.

The cancel steps for EJM process include all steps for cancel single stream and one additional step – sending trigger to task reporter in order to EJM process can finish correctly

  1. Delete processing files from ‘processing’ folders of streams directories (example, ‘/estar/tpe/data/msgcnetr/out/CSV/bt142658_task_translator/processing/’)
    For EJM process sometimes the file should be deleted not only from target stream (for example inbound stream for loading data), but also from the eagle control streams such as ‘eagle_ml-2-0_default_cm_datafile_control’ or ‘eagle_ml-2-0_default_cm_parallel_exec’. These streams are waited for completion of target stream. File from ‘processing’ folder of such streams should be deleted firstly and after that file from ‘processing’ folder of target stream.

  2. Update status of processing MC task and message in msgcenter_dbo.msg_message_stat and msgcenter_dbo.tasks in order to mark them as completed

  3. Send trigger file to the ‘eagle_ml-2-0_default_cm_task_reporter’ stream to finish the EJM process
    Example of trigger data:

  4. Restart MC processor, which processes current file

Cancel an Entire Workflow

For RTR for Cancel Entire Workflow the following parameters are available:

  • ActionType = ‘CANCEL’ (required)

  • StreamName = ‘eagle_ml-2-0_default_cm_execwkfl’ (required)

  • CancelWorkflowName = The name of workflow to cancel (required)

  • CancelCorrelationId = Correlation Id of workflow instance to cancel (optional). If empty, all instances of CancelWorkflowName will be cancelled

  • CancelEvents = 1 or skipped (optional). If 1, all events for CancelWorkflowName will be cancelled

  • CancelStreams = 1 or skipped (optional). If 1, underlying streams executed under steps of CancelWorkflowName will be cancelled too.

or

Cancel a Workflow Substep

Pause a Workflow

For RTR for Pause Workflow the following parameters are available:

  • ActionType = ‘PAUSE’ (required)

  • StreamName = ‘eagle_ml-2-0_default_cm_execwkfl’ (required)

  • PauseWorkflowName = The name of workflow to pause (required)

  • PauseCorrelationId = Correlation Id of workflow instance to pause (optional). If empty, all instances of PauseWorkflowName will be paused.

You can set the following parameters for PAUSE:

  • RETRY_CHECK_WORKFLOW_PAUSED is  w_custom_config parameter to set count of cycle

  • RetryCheckWorkflowPaused is RTR parameter to set count of cycle

  • W_PROCESS_TIMEOUT is w_custom_config parameter to set time of waiting of changing Pause Status

  • ProcessTimeout is RTR parameter to set time of waiting of changing Pause Status

Resume a Workflow

For RTR for Resume Workflow the following parameters are available:

  • ActionType = ‘RESUME’ (required)

  • StreamName = ‘eagle_ml-2-0_default_cm_execwkfl’ (required)

  • ResumeWorkflowName = The name of workflow to resume (required)

ResumeCorrelationId = Correlation Id of workflow instance to resume (optional). If empty, all instances of ResumeWorkflowName will be paused.