Example Starting a Workflow Process through scripting function InvokeProcess

Example starting a workflow process through scripting

This preview shows page 153 - 155 out of 512 pages.

/ Example: Starting a Workflow Process through scripting function Invoke_Process() { var svc = TheApplication().GetService("Workflow Process Manager"); var Input = TheApplication().NewPropertySet(); var Output = TheApplication().NewPropertySet(); var bo = TheApplication().ActiveBusObject(); var bc = bo.GetBusComp("Account"); var rowId = bc.GetFieldValue("Id"); Input.SetProperty("ProcessName", "My Account Process"); Input.SetProperty("Object Id", rowId); svc.InvokeMethod("RunProcess", Input, Output); } Example of Starting a Workflow Process from a Script to Pass Field Values to Process Properties This topic gives one example of starting a workflow process from a script in order to pass field values to process properties. You might use this feature differently, depending on your business model. The following script starts a workflow process that is named My Opportunity Process. In this example, the workflow process is started in the object manager. Field values are passed to process properties that are defined in the workflow. //Example: Passing Field Values to Process Properties function Invoke_Process() { var svc = TheApplication().GetService("Workflow Process Manager"); var Input = TheApplication().NewPropertySet(); var Output = TheApplication().NewPropertySet(); var bo = TheApplication().ActiveBusObject(); var bc = bo.GetBusComp("Opportunity"); var rowId = bc.GetFieldValue("Id"); var accountId = bc.GetFieldValue("Account Id"); Input.SetProperty("ProcessName", "My Opportunity Process"); Input.SetProperty("Object Id", rowId); // Pass the value of the Account Id field to the Account Id process property Input.SetProperty("Account Id", accountId); svc.InvokeMethod("RunProcess", Input, Output);
Image of page 153
Siebel Business Process Framework: Workflow Guide Version 8.1, Rev A Options for Developing a Workflow Process Starting a Workflow Process 154 Starting a Workflow Process from a Script by Using the Server Requests Business Service You can asynchronously start a workflow process from a script by using the Server Requests business service. For more information, see “Example of Using the Server Requests Business Service to Start a Workflow Process from a Script” on page 305 . Example of Starting a Workflow Process from a Custom Toolbar This topic gives one example of starting a workflow process from a custom toolbar. You might use this feature differently, depending on your business model. To start a workflow process from a custom toolbar 1 In Siebel Tools, navigate to the Business Services OBLE, then define a new business service using values from the following table. 2 Navigate to the Commands OBLE, then define a new command using values from the following table. If necessary, expose the Command object in the Object Explorer. For more information, see “Exposing Object Types That Are Used to Develop a Workflow Process” on page 116 . 3 In the Object Explorer, click Toolbar, then query the Name property in the Toolbars OBLE for HIMain.
Image of page 154
Image of page 155

You've reached the end of your free preview.

Want to read all 512 pages?

  • Summer '16
  • Oracle
  • Siebel Workflow, Workflow Guide

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern

Stuck? We have tutors online 24/7 who can help you get unstuck.
A+ icon
Ask Expert Tutors You can ask You can ask ( soon) You can ask (will expire )
Answers in as fast as 15 minutes
A+ icon
Ask Expert Tutors