Stopping a Load Plan Run from a Command Line

20-20 Oracle Fusion Middleware Developers Guide for Oracle Data Integrator ■ In the run-time agent, a web service allows starting a scenario or a Load Plan, monitoring a session status or a Load Plan run status, and restarting a session or a Load Plan instance, as well as stopping a Load Plan run. To use operations from this web service, you must first install and configure a standalone or a Java EE agent. ■ A dedicated public web service component provides operations to list the contexts and scenarios available. To use operations from this web service, you must first install and configure this component in a Java EE container. The following applies to the SOAP request used against the agent and public web services ■ The web services operations accept password in a plain text in the SOAP request. Consequently, it is strongly recommended to use secured protocols HTTPS to invoke web services over a non-secured network. You can alternately use external authentication. See Section 20.11.12, Using the Run-Time Web Services with External Authentication for more information. ■ Repository connection information is not necessary in the SOAP request as the agent or public web service component is configured to connect to a master repository. Only an ODI user and the name of a work repository are required to run most of the operations.

20.11.2 Executing a Scenario Using a Web Service

The invokeStartScen operation of the agent web service starts a scenario in synchronous or asynchronous mode; in a given work repository. The session is executed by the agent providing the web service. OdiStartScenRequest Credentials OdiUserodi_userOdiUser OdiPasswordodi_passwordOdiPassword WorkRepositorywork_repositoryWorkRepository Credentials Request ScenarioNamescenario_nameScenarioName ScenarioVersionscenario_versionScenarioVersion ContextcontextContext LogLevellog_levelLogLevel SynchronoussynchronousSynchronous SessionNamesession_nameSessionName Keywordssession_nameKeywords Variables Namevariable_namename Valuevariable_valueValue Variables Request OdiStartScenRequest The scenario execution returns the session ID in a response that depends on the value of the synchronous element in the request. ■ In synchronous mode Synchronous=1, the response is returned once the session has completed, and reflects the execution result. ■ In asynchronous mode Synchronous=0, the response is returned once the session is started, and only indicates the fact whether the session was correctly started or not. Running Integration Processes 20-21 This operation returns a response in the following format: ?xml version = 1.0 encoding = ISO-8859-1? ns2:OdiStartScenResponse xmlns:ns2=xmlns.oracle.comodiOdiInvoke Session543001Session ns2:OdiStartScenResponse

20.11.3 Monitoring a Session Status Using a Web Service

The getSessionStatus operation of the agent web service returns the status of one or more sessions in a given repository, identified by their Session Numbers provided in the SessionIds element. It manages both running and completed sessions. OdiGetSessionsStatusRequest Credentials OdiUserodi_userOdiUser OdiPasswordodi_passwordOdiPassword WorkRepositorywork_repositoryWorkRepository Credentials SessionIdssession_numberSessionIds OdiGetSessionsStatusRequest This operation returns a response in the following format: SessionStatusResponse SessionIdsession_idSessionId SessionStatusstatus_codeSessionStatus SessionReturnCodereturn_codeSessionReturnCode SessionStatusResponse The Return Code value is zero for successful sessions and possible status codes are: ■ D: Done ■ E: Error ■ M: Warning ■ Q: Queued ■ R: Running ■ W: Waiting

20.11.4 Restarting a Session Using a Web Service

The invokeRestartSess operation of the agent web service restarts a session identified by its session number provided in the SessionID element in a given work repository. The session is executed by the agent providing the web service. Only sessions in status Error or Waiting can be restarted. The session will resume from the last non-completed task typically, the one in error. Note that you can change the value of the variables or use the KeepVariables boolean element to reuse variables values from the previous session run. invokeRestartSessRequest Credentials OdiUserodi_userOdiUser OdiPasswordodi_passwordOdiPassword WorkRepositorywork_repositoryWorkRepository Credentials Request