Using the CWProcessIn Message to Start a Periodic Process

Purpose: Use the CWProcessIn message to submit a periodic process. For example, you can use this message if you prefer to set up scheduling for periodic processes externally rather than use the setup described under Scheduling Jobs.

This message uses the CWServiceIn Web Service.

What does the request message include? The message needs to specify a valid periodic process to start, and the code identifying the company where the process should run.

Which job queue is used? The web service submits the periodic process to the job queue defined for the periodic process in Working with Periodic Processes (WPPR).

Immediate response: The web service returns a response immediately indicating whether the periodic process has been submitted successfully. Once the process is submitted, you can use the Job Management Screen to determine when the process is completed and whether the process completed successfully. Once the process is complete, you can also use the Document Management Screen or Forms Management Screen to review generated reports or forms.

User ID: A periodic process you start through the CWProcessIn message runs under your default user, so you can review any submitted jobs and reports by filtering on this user at the Job Management Screen, Document Management Screen, or Forms Management Screen.

For more information: See:

Working with Periodic Processes (WPPR) for background on periodic processes

Executing Periodic Processes (EPRO) for information on submitting and scheduling periodic processes using Order Management System screens

Generic Web Services for setup information on the CWServiceIn web service

Scheduling Jobs for background on scheduling jobs, and a listing of periodic functions available to schedule

In this chapter:

CWProcessIn Message

- Sample CWProcessIn Message

- Responses to the CWProcessIn Message

- CWProcessIn Contents

CWProcessIn Message

Sample CWProcessIn Message

Below is a sample CWProcessIn message embedded in a SOAP envelope.

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:dom="http://dom.w3c.org">

<soapenv:Header/>

<soapenv:Body>

<dom:performAction type="xsd:string"><![CDATA[

<Message source="SoapUI" target="OMS" type="CWProcessIn"><CWProcessIn company_code="6" process_code="PROCESS" /></Message></Message>

]]>

</dom:performAction>

</soapenv:Body>

</soapenv:Envelope>

Responses to the CWProcessIn Message

Successful message (OK): When the request message correctly specifies an existing company and periodic process to submit, the web service returns the following message, presented below in a SOAP envelope. This message does not indicate that the periodic process has completed successfully.

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

<soapenv:Body>

<performActionReturn xsi:type="xsd:string">&lt;Message>OK&lt;/Message></performActionReturn>

</soapenv:Body>

</soapenv:Envelope>

Unsuccessful message (FAILED): If the request message specifies an invalid company or process code, the web service returns the following message, presented below in a SOAP envelope.

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

<soapenv:Body>

<performActionReturn xsi:type="xsd:string">&lt;Message>FAILED&lt;/Message></performActionReturn>

</soapenv:Body>

</soapenv:Envelope>

CWProcessIn Contents

Tag

Description

type

Must be set to CWProcessIn

company_code

The company code where the periodic process should run. Required even for periodic processes that run for all companies, for example, starting or stopping asyncs. The system ignores the company parameter for periodic functions in the process that do not require company.

It is not necessary to include padding zeroes; for example, the message can specify either 006 or 6 for company 6.

Validated against the company table.

Numeric, 3 positions; required.

process_code

The code identifying the periodic process to run. Must be an existing periodic process.

Alphanumeric, 10 positions; required.

CWProcessIn OROMS 17.0 2018 OTN