How to create Instace of another process from running process.

Hi,
I want to create an instance of another process from my running process. Along with this i want to pass a business object as input parameter to this instance. Please help me to do this !!!

This and other ways to create an instance in another process was described in Re: create new process instance
1. Here's how you can create an instance in a process using logic in an Automatic activity's method. This uses the "Fuego.Lib.ProcessInstance.create()" method shown below inside a process:
// "argsIn" is an associative string array (Any[String])
argsIn as Any[String]
// this assumes that the Begin activity has two argument variables
//   named "nameArg" (a string) and "myBpmObjectArg" (a BPM
//   object variable) and you're setting them
//   to the previously initialized variables "name" and
//   "myBpmObject" respectively
argsIn["nameArg"] = name
argsIn["myBpmObjectArg"] = myBpmObject
// logic here to determine the name of the process to create an instance in
idOfProcess as String
idOfProcess = <hard coded string that has the id (not the name) of the process to instantiate>
ProcessInstance.create(processId : "/" + idOfProcess, arguments : argsIn,
     argumentsSetName : "BeginIn") ProcessInstance is in the Catalog inside Fuego.Lib.
The processId parameter (the "idOfProcess" variable in the above logic) is the thing I most commonly screw up with this. It is the text you see when you right mouse click the process in the Project Navigator tab -> "Properties". Look at the value in the "Id" field and not the "Name" field here (the name without any space characters). Prefix it with a "/" as is shown here and if you've deployed this using an organization unit (OU) then prefix this to the string also.
The third parameter is almost always "BeginIn". Begin activities in a process can have many incoming argument mappings, the default is "BeginIn". To see yours, double click the process's Begin activity and look at the mapping's name in the upper left corner of the dialog.
"argsIn" is the set of incoming argument variables you want passed into the process. A common mistake is to type in the names of the incoming argument variables without the double quotes like this:
// this will *NOT* work
argsIn[nameArg] = name
argsIn[myBpmObjectArg] = myBpmObject
. . .Here is the correct syntax:
// this *WILL* work
argsIn["nameArg"] = name
argsIn["myBpmObjectArg"] = myBpmObject
. . .In this example, the process has two argument variables. It does not matter if the incoming argument variables are primitive type arguments (e.g. String, Integer, Decimal...) or BPM Objects, it is always done the same way. In this example, there is a String incoming argument called "nameArg" and a BPM Object incoming argument called "myBpmObjectArg".
2. A process can create a new instance in another process using the Subflow activity which synchronously creates an instance in a child subprocess and waits for the result to return once the instance in the child subprocess reaches the End activity in the process. From the parent process, you'd match the incoming and outgoing argument variables of the called child process with instance variables in your parent process.
3. A process can create a new instance in another process using the Process Creation activity which asynchronously creates an instance in a child subprocess (fire and forget) but does not wait for the child to respond to the parent. Once the child process begins, the parent continues its flow. From the parent process, you'd match the incoming argument variables of the called child process with instance variables in your parent process.
Dan

Similar Messages

  • How to create parent and chile process in java

    i'm beginning in java, and i want to ask something, please help me...
    1. i want to ask how to create parent and child process in java???
    example :
    if have one window and explore menu, when i click the explore menu.
    new window come out.
    how if i close the parent window the child window will close too...
    2. what is the method from runtime class to get available memory and Active Threads count

    ONE way to do what you wanted is this.
    class Parent{
    Child c = new Child
    allChildren.add(c);
    //if close
    iterate through list
    (Child)allChildren.get(index).close();
    ArrayList allChildren;
    class Child{
    public void close(){ }
    i dont know if you can get the thread count. but you can
    get the current thread by using System.
    Memory: Runtime.freeMemory() .maxMemory() .totalMemory()
    http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Runtime.html
    Careful though you have to do a calculation to get the
    actual memory because those 3 methods refer to freeMemory
    of the CURRENT heap not the total memory.
    i think its: total - (max - free)

  • How  to  create  adhoc  chain  in process chain

    how  to  create  adhoc  chain  in process chain

    hi,
    ad hoc process chain is also the process cahin which will run seperatly from main chains.
    as you do for process cahin create it also.
    Process chain creation
    http://help.sap.com/saphelp_nw04s/helpdata/en/67/13843b74f7be0fe10000000a114084/content.htm
    http://help.sap.com/erp2005_ehp_03/helpdata/EN/86/6ff03b166c8d66e10000000a11402f/frameset.htm
    Ramesh

  • How to create ArrayColletion in mx:Script from mx:Model id="results" source="/data/data.xml" /

    How to create ArrayColletion in mx:Script from <mx:Model
    id="results" source="/data/data.xml" />
    Please see my code:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    layout="absolute">
    <mx:Model id="results" source="/data/data.xml" />
    <mx:Script>
    import mx.collections.ArrayCollection;
    import mx.utils.ArrayUtil;
    import mx.controls.Alert;
    </mx:Script>
    <mx:ArrayCollection id ="dt1"
    source="{ArrayUtil.toArray(results.result)}"/>
    <mx:Script><![CDATA[
    [Bindable]
    public var expenses:ArrayCollection = dt1;
    [Bindable]
    public var expenses2:ArrayCollection = dt1;
    [Bindable]
    public var dp:ArrayCollection=expenses;
    public function changeDataProvider():void{
    Alert.show(expenses.toString());
    if (dp==expenses){
    dp=expenses2;
    }else{
    dp=expenses;
    ]]></mx:Script>
    <mx:Panel x="10" y="10" width="100%" height="378"
    layout="absolute">
    <mx:ColumnChart dataProvider="{dt1}" x="10" y="10"
    id="myChart" height="318" width="100%">
    <mx:horizontalAxis>
    <mx:CategoryAxis categoryField="month"/>
    </mx:horizontalAxis>
    <mx:series>
    <mx:ColumnSeries displayName="apple" yField="apple"/>
    <mx:ColumnSeries displayName="orange"
    yField="orange"/>
    <mx:ColumnSeries displayName="banana"
    yField="banana"/>
    </mx:series>
    </mx:ColumnChart>
    <mx:Legend dataProvider="{myChart}" x="481" y="10"/>
    </mx:Panel>
    <mx:Button x="284" y="416" label="Change Data" id="bt"
    click="changeDataProvider()" />
    </mx:Application>

    Tracy,
    Thanks. That worked. However I have another related question:
    I convert the xml feed to a XMLListCollection by doing:
    <mx:XMLListCollection id="mission"
    source="{xmlFeed.lastResult.day}"/>
    and
    <mx:XMLListCollection id="mission1"
    source="{xmlFeed.lastResult.day.tBlock}"/>
    On the chart I have
    <mx:ColumnChart id="missionReadiness" height="150%"
    width="100%"
    paddingLeft="2" paddingRight="2"
    showDataTips="true" dataProvider="{mission1}">
    <mx:series>
    <mx:ColumnSeries xField="" yField="@today"
    displayName="Today"/>
    <mx:ColumnSeries xField="" yField="@tomorrow"
    displayName="Tomorrow"/>
    <mx:ColumnSeries xField="" yField="@afterT"
    displayName="After Tomorrow"/>
    </mx:series>
    </mx:ColumnChart>
    the yField works, but for the xField I want to have the @date
    but refers to the parent node, so I am clueless on how to refer to
    it.
    Also, I would like to display on the chart only the values to
    a specific date (like @date="05/17/2007").
    Any suggestions on how to do that?
    Gilbert

  • How to create a group of contact from a multi-selection of mails in a mailbox to answer to all senders?

    How to create a group of contact from a multi-selection of mails in a mailbox to answer to all senders?

    Use Mail Scripts. Its Add Addresses function will collect all the addresses from all selected messages and allow you to select the ones you want to add and allow you to create groups as you go.

  • How to copy file to another server from database using FTP in oracle

    How to copy file to another server from database using FTP in oracle.
    Please do the needfaul.

    Billy  Verreynne  wrote:
    BluShadow wrote:
    Not to mention that some FTP servers can return more than one return message per operation whereas others may return one message for the same operation.I had the problem using the LIST command to determine if a file exists on the server. Cannot be determined via the FTP server's return code. Which means parsing and checking the text response from the server to the command. And this vary from server to server.
    But the basics were quite easy to code. The entire package is 500 lines, includes comments and blank lines for formatting, and supports the basic FTP client command set. Not really a complex piece of software to write - but I found that many developers seem to think that writing network socket software is complex. Not really the case...Mine's a big larger, but incorporates functionality similar to what Chris provided in his, such as being able to use SQL to query a remote file using pipelined functions, or functionality to write the results of a query directly to a remove file.
    :)

  • How to create automatic creation of BP from customer and vendor master data

    Hi gurus,
    can any one tell how to create automatic creation of BP from customer and vendor master data.
    Please give me the steps.
    Thanks
    Sasikanth.

    HI,
    Goto SPRO\ Cross application components \ Master data synchronization \ Synchronization control.
    Assign account groups of customer and vendors to respective BP grouping. This setting is enough to create BP in background while creating customer / vendor. But the fields groups are very much important, ensure mandatory fields should be sync.
    rgds,
    Srini

  • How to create a interface with NTR from SAP XI?

    How to create a interface with NTR from SAP XI?

    Hi,
        What do you mean by NTR ?...
    What are the details you needed...Please be clear and more elaborative as far as possible..so that you will get straight forward answers...
    HTH
    Rajesh

  • How to create Handling Unit using Process Order no. & Packing Instruction

    Hi experts,
    Please guide me how to create Handling Unit using Process Order number & Packing Instruction reference?Noramlly this is done using standard transaction 'COWBPACK'.
    ANY FUNCTION MODULE OR BAPI TO DO THIS.
    if any solution please explain with proper example..
    Thanks In advance
    Thanks,
    Yogesh

    Hi experts,
    Please guide me how to create Handling Unit using Process Order number & Packing Instruction reference?Noramlly this is done using standard transaction 'COWBPACK'.
    ANY FUNCTION MODULE OR BAPI TO DO THIS.
    if any solution please explain with proper example..
    Thanks In advance
    Thanks,
    Yogesh

  • How to create info area for process chains?

    How to create info area for process chains?

    Hi,
    If I understand your question clearly, you want to assign display componets.
    once you have created you chain you assign the components by clicking CTRL+F11
    Regards,
    Namrata

  • How to put music on another computer from ipod

    How to put music on another computer from ipod

    For non-Tunes purchases you need a thrid-party program like one of those discussed here:
    newer copy

  • How do I remove the coloured bars from running down the side of my emails.

    How do I remove the coloured bars from running down the side of my emails.

    Hi
    The setting I have in Composing are-
    Composing
    Message Format - Rich Text
    In addressingonly have  tick in When sending to a group
    Responding - tick only the first two boxes
    Last only the bullet for Include selected text
    Hope htis helps

  • Challenge: How to create an BMP Java Bean from a DBF Database??

    Hello guys....
    This is my challenge and looking for some aim:
    I was asked to create an application that must read from an existing DBF Database of products (That is already used by an administrative system) an build a Price List in Real Time. The program must be accesible through Intranet using a web browser.
    The Appplication Client must be a faster GUI (Applet or App) that do not cause interference in the normal functions of the Administrative System that owns the DBF Database, but must propagate any change maded to the database in real time.
    I was thinking to use BMP Entity Beans for manage the DBF Tables and Utility Beans to avoid constan access to the tables (As in Duke�s Bank Tutorial) but i do not know how to create a BMP Entity Bean without a Database that do not have an JDBC Driver ?????????
    i was able to gain access to DBF TAbles using an small library called TinySQl but i get lost in this point....
    any suggestions/comments about following matters will be apreciate:
    1.- Application Performance Tips
    2.- A better JDBC Driver for DBF Databases
    3.- Application�s Security
    4.- User Management
    5.- Any comments in general !!!!!!!!!!
    Initially 15 Duke�s Dollar will be offered to the best anwser, but i considering to offer 5 duke�s dollar to the best second anwser that can be earned through another post i will create later!!!!!!!!!11
    Regards.................

    Hello guys....
    This is my challenge and looking for some aim:
    I was asked to create an application that must read
    from an existing DBF Database of products (That is
    already used by an administrative system) an build a
    Price List in Real Time. The program must be
    accesible through Intranet using a web browser.
    The Appplication Client must be a faster GUI (Applet
    or App) that do not cause interference in the normal
    functions of the Administrative System that owns the
    DBF Database, but must propagate any change maded to
    the database in real time.
    I was thinking to use BMP Entity Beans for manage the
    DBF Tables and Utility Beans to avoid constan access
    to the tables (As in Duke�s Bank Tutorial) but i do
    not know how to create a BMP Entity Bean without a
    Database that do not have an JDBC Driver ?????????
    i was able to gain access to DBF TAbles using an
    small library called TinySQl but i get lost in this
    point....
    any suggestions/comments about following matters will
    be apreciate:
    1.- Application Performance Tips
    2.- A better JDBC Driver for DBF Databases
    3.- Application�s Security
    4.- User Management
    5.- Any comments in general !!!!!!!!!!
    Initially 15 Duke�s Dollar will be offered to the
    best anwser, but i considering to offer 5 duke�s
    dollar to the best second anwser that can be earned
    through another post i will create later!!!!!!!!!11
    Regards.................
    PLEASE DO NOT POST REPLIES IN THIS THREAD, USE THE UPPER THREAD THAT HAVE 10 DUKE�S DOLLARS ASSIGNED.
    SORRY

  • How to create Import Declaration (Inward Processing) in SAP GTS

    How to create Import declaration in SAP GTS system for transaction based on Sales Order and Return Delivery documents in ECC6 feeder system. The scenario is described as below:
    In backend (feeder) system ECC6:
    1. Sales Order SD Document Category = u2018C u2013 Orderu2019 will be used.
    2. A Return Delivery Document similar to LR will be used (Document category u2018T u2013 Returns Delivery) to take back the material.
    Import Declaration functionality system requirement is as below:
    1. It should be possible to send out Pre-notification to Customs when the goods are picked up from the customer site (based on the order cerated).
    2. When the return material is received (on Goods Receipt against the Return Delivery) final Import Declaration to be submitted to the customs authorities.
    3. It should be possible to track (tag) if any replacement material is sent back to the customer. Meaning the Import of a return material should be tagged with corresponding export (replacement material sent to the customer) transaction.
    My understanding is that the Import Declaration functionality in SAP GTS is based on Purchase Order and Shipping Notification. I would like to know how the above scenario (Sales document based) can be best supported for Import Declaration via SAP GTS system.
    Thansk in advance for suggestions/ideas.
    BR/Arup

    Hello Arup,
    In GTS 8.0, the Returns Delivery can act just like an Inbound Delivery in GTS.  Of course you need to populate the "Preliminary Document" type and number in the FT header.
    The Delivery creates a Customs Shipment in GTS.  You could configure message processing to send data from the Customs Shipment to the Customs system for pre-alert, providing that only header data is required at that stage.
    The subsequent Goods Receipt appears in the normal work-list for Declaration after GR, provided you close the "safekeeping" using Transit processing or the BAdI provided for that purpose.
    The GTS Inward Processing solution does not currently support a single Product being both a component and a compensating product, so your wish to tie up re-exports with the customer returns may be quite difficult.
    I hope that helps.
    Best regards,
    Dave

  • How to create COGSuFF0Cwhen goods was returned from customer

    Hi,
        goods which deliveried from nonvaluated sales order stock was returned from customer and reduce revenue and AR.
    so, we need do following process:
        create returned sales order〉delivery note and goods receipted-〉billing
      the goods can be receipted in sales order stock ,and can be invoiced .
    but how to create COGS  with returened sales order for nonvaluated sales order stock?

    Hi
      T-CODE :MR21 ,It is used to change the standard price ,we are in the environment that make to order with nonvaluated sales order stock ,so donu2019t need do standard coting .
    I konw : With a nonvaluated sales order stock, inventory changes are not reflected in Financial Accounting. The sales order stock is settled to Financial Accounting only after results analysis and settlement of the calculated values (results analysis data) .
      for normal process , if billing was created ,then do results analysis and settlement of the calculated values ,COGS will be post in financial accounting
      for returen prcoess :
      1. created returen sales order and referenced origin billing document.
       2. create delivery note and goods receipted in sales order stock which was deliveried to customer stock
      3. create billing document and revenue posted in financial accounting
       4. do results analysis with returen sales order ,the system show error message:               W     KJ     816     No object was selected
         when used the orign sales order to do results analysis ,but without any change to save !
    how to post COGS in financial accounting ,when goods was return from cusromer in the environment that make to order with nonvaluated sales order stock ?

Maybe you are looking for