Global Automatic Activity - Process to Process

Hi,
How can we invoke another process from one process using a Global automatic activity..Is PAPI the only way? How can we use PAPI code inside of a Global Automatic Activity to call another process?v Any examples?
Edited by: user647659 on Oct 27, 2008 11:02 PM
Edited by: user647659 on Oct 28, 2008 11:49 AM

I am not sure what you saying..Did u mean Global Creation ? But that would have a user to invoke the process..I want to invoke it automatically...I got a part of the answer...But it takes all instances..and creates multiple instances..I want to isolate the instances previously been transferred..What I am doing is ..Using a Global Automatic to invoke the other process.Writing a PAPI code to call the other process from this process...and Polling By Interval every 1m..
Here is a code:-
ProcessService ps;
ps.connectTo(url : Fuego.Server.directoryURL, user : (String)BusinessParameter.getValue(name : "USER_NAME"), password : (String)BusinessParameter.getValue(name : "PASSWORD"));
logMessage("Process Service connected--->" );
businessProcess = ps.getProcess(process : "StartProcess");
InstanceFilter instanceFilter;
instanceFilter.create(processService : ps);
SearchScope searchScope = new SearchScope(ParticipantScope.ALL,StatusScope.INPROCESS_AND_COMPLETED);
instanceFilter.searchScope = searchScope;
result2 = businessProcess.getInstancesByFilter(filter : instanceFilter);
logMessage("Length ==>" +length(result2));
length = length(result2);
logMessage("Length Transferred==>" +length);
test["name"] = "testing";
if(length > 0)
     for(int i=0; i < length; i++)
          ProcessInstance.create(arguments : test, argumentsSetName : "BeginIn");
else
     logMessage("length is-->" + length);
length = 0;
Any suggestions on how to isolate the previous obtained instances would be appreciated..
Thanks,

Similar Messages

  • Transfer value from global automatic activity in Aqualogic BPM Suite

    Hi, I am new to Aqualogic BMP suite and stuck with the following problem :
    In aqualogic bpm suite, if we are setting some values to some variables in a global automatic activity in a process how to get those values back in some other activities (say an Interactive activity) in the same process or how to assign the values to some instance variables in the Begin activity ??
    We have a scenario where we are creating some process instances from the Global Automatic activity using the following :
    args["name"] = abc
    create ProcessInstance using parameters = args
    Now how to get the value "abc" and assign this value to an instance variable in the Begin activity(/access the value "abc" in an interactive activity)within the same process.
    Thanks,
    Suman.

    Hi,
    Let's say you have an Argument Set defined in your Begin activity called BeginIn. The arguments in this Argument Set can be "a", "b" and "c" of type String, Int and boolean accordingly.
    If you want to use the ProcessInstance.create method, then you would need to have a PBL script like this one:
    args[] = [ "a" : "SomeStringLiteral", "b" : 1234, "c" : true ];
    ProcessInstance.create(processId : "/MyProcess", arguments : args, argumentsSetName : "BeginIn");
    HTH,
    eduardoc.

  • Create Process via Global Automatic activity

    Hi!
    I´m trying to automatize some process, that can auto-execute one time at a day. For this, i'm thinking of use the global automatic activity, and I 've scheduled to execute (for testing) every minute. But this never happends
    If the global has no bp.Method inside, obviusly, nothing happends. Hence, when i wrote this code:
    logMessage "Se ha iniciado el proceso de consulta de calendario a las:" +'now'
         using severity = INFO
    ProcessInstance.create(processId : "/ConsultarCalendarioCompras", arguments : null, argumentsSetName : "")
    how could i solve this?
    Thanks

    Hi,
    Are you seeing your log INFO statement in the log file every minute? Assuming you are, I think all you're missing is a valid value for the third parameter. Try changing your logic to this:
    ProcessInstance.create(processId : "/ConsultarCalendarioCompras",
         arguments : null, argumentsSetName : "BeginIn")
    . . .Once you get this working, take a look at this thread for information on how to pass in argument variables into the work item instance using the second parameter: Re: How to create Instace of another process from running process.
    Hope this helps,
    Dan

  • Trigger a Begin event running Global Automatic activity

    Hi
    I have a situation explained as follows:
    The BPM Process flow would be triggered when a message comes into a JMS Queue.
    I have configured the JMS Messaging Service as an external resource and used a Global Automatic Activity as an Automatic JMS Listener to listen on that queue.
    Once the message is received on the queue, I want my actual process flow to be instantiated and activities following the begin activity to be executed.
    In the Studio Reference document, it is mentioned that
    You can trigger a Begin event running Global Automatic activity.
    Can someone tell me the steps to trigger the Begin Event from Global Automatic Activity and create the process instance.
    Thanks

    You have to call this method
    ProcessInstance.create(arguments : args, argumentsSetName : "BeginIn")
    Args is Any[String] where you put you input arguments that you have in your begin activity and BeginIn is the set of arguments you have in the begin activity.
    HTH

  • Process creation using Global Automatic Activity - OBPM 10g

    Hi,  I would like create the process instance for my application on every 2nd business day of a month. I also have a calendar defined for checking business day.  But I am unable to figure out to how use that calendar to determine second business day of any month. Global Automatic type is set to Automatic schedule and monthy option was selected. But I believe this would trigger the process on every second day of the month, without considering the fact whether its  business day or not. There is Runs on Holidays checkbox, but not sure what it really does. If it checks for holidays then which calendar does it refers to. Hence, please let me know how can i specify a calendar or any alternate solution to trigger process creation. Thanks, Namit
    n

    I am not sure what you saying..Did u mean Global Creation ? But that would have a user to invoke the process..I want to invoke it automatically...I got a part of the answer...But it takes all instances..and creates multiple instances..I want to isolate the instances previously been transferred..What I am doing is ..Using a Global Automatic to invoke the other process.Writing a PAPI code to call the other process from this process...and Polling By Interval every 1m..
    Here is a code:-
    ProcessService ps;
    ps.connectTo(url : Fuego.Server.directoryURL, user : (String)BusinessParameter.getValue(name : "USER_NAME"), password : (String)BusinessParameter.getValue(name : "PASSWORD"));
    logMessage("Process Service connected--->" );
    businessProcess = ps.getProcess(process : "StartProcess");
    InstanceFilter instanceFilter;
    instanceFilter.create(processService : ps);
    SearchScope searchScope = new SearchScope(ParticipantScope.ALL,StatusScope.INPROCESS_AND_COMPLETED);
    instanceFilter.searchScope = searchScope;
    result2 = businessProcess.getInstancesByFilter(filter : instanceFilter);
    logMessage("Length ==>" +length(result2));
    length = length(result2);
    logMessage("Length Transferred==>" +length);
    test["name"] = "testing";
    if(length > 0)
         for(int i=0; i < length; i++)
              ProcessInstance.create(arguments : test, argumentsSetName : "BeginIn");
    else
         logMessage("length is-->" + length);
    length = 0;
    Any suggestions on how to isolate the previous obtained instances would be appreciated..
    Thanks,

  • Global automatic activity's HTTPS listener

    Hi all,
    I have a client application (POS point of sale) that needs to invoke a process. The POS system sends its messages in a specific XML format over HTTPS protocol and I can't play with this part. I'm trying to develop a custom event listener but the provided sample is not enough.
    Bea help is appreciated
    Thanks guys

    You have to call this method
    ProcessInstance.create(arguments : args, argumentsSetName : "BeginIn")
    Args is Any[String] where you put you input arguments that you have in your begin activity and BeginIn is the set of arguments you have in the begin activity.
    HTH

  • Polling or JMS Message in Global Automatic

    Hi,
    I am currently working on a process which uses a Global Automatic activity to invoke a process instance. The process instance is invoked when the process receives some ticket information ( ticket id, type of ticket, customer name etc.) from an external application. This information is passed to the process using a web-service.
    Now, I am confused whether to use JMS message or Polling by Interval inside of the Global Automatic acitivity to receive the message with the ticket information. Could anyone please suggest..
    Also does anybody have an example of invoking a process instance after receiving a JMS message...?

    HI!!!
    In this URL of the Glorius bea.edocs.com, there is an example about working with JMS
    http://egeneration.beasys.com/albsi/docs55/index.html

  • Webservice vs JMS in Global Automatic

    Hi all,
    My client wants to automatically initiate a process after receiving some information from a web service. I have to use a Global Automatic activity to do so. I understand that the Global Automatic activity has an option to listen to an automatic JMS message and trigger/start/initiate the process..
    But the global automatic activity has no option to trigger/start/initiate the process after receiving some information from a web service. Can this be done irrespective of whether the Global Automatic activity has the option or not? Or do I have to only use JMS message to trigger the process?
    Edited by: user647659 on Aug 7, 2009 7:29 AM

    But the global automatic activity has no option to trigger/start/initiate the process after receiving some information from a web service. Can this be done irrespective of whether the Global Automatic activity has the option or not? Or do I have to only use JMS message to trigger the process?To see how to create an instance from a Global Automatic (or any activity) using logic go to How to create Instace of another process from running process.
    Dan

  • Global create activity with screenflow and constructor

    Hi
    Question 1) Is it possible to get data from database (Oracle) in constructor
    Execute Screen flow in a row (One fer other) if yes how and if
    not how can we do that?
    Question 2) Explain how data can be displayed in JSP with BPM Object
    Please give simple example.
    Thanks in advance

    Sorry, I'm not following what you're asking. Screenflows do not have constructors. Is it possible that you mean an instance variable BPM Object's constructor? If this is the case, I'd suggest you instead keep the BPM Object's constructor very lean.
    You can run SQL from any Automatic task inside a Screenflow, any Automatic activity inside a process or BPM Object's methods that have their "Server Side Method" property set to "Yes". BPM Object constructors have their "Server Side Method" property set to "No" and cannot be changed. While you could invoke another method from the constructor that is server side, I would not recommend doing it. Almost always you'll want fresh data from the database displayed just prior to a presentation being displayed. If you populate information from a database inside your BPM Object's constructor, the information would be populated when the instance gets created in the Begin activity. If an instance takes 3 weeks to reach the 5th activity in the process, this same stale information populated 3 weeks ago when the object was initialized will be displayed in presentations shown in this activity. Presentations can have an initialization method (method run just before the presentation is shown). Consider using presentation initialization methods to retrieve the latest information from the database.
    Hope this helps,
    Dan

  • How to abort instances which are stuck in automatic activity

    Hi,
    Some of the instances are got stuck in automatic activity of a process, how can we abort those instances. In engine db - PPROCINSRANCE table i am able to see the instances but PTODO table, it doesn't have any records.
    As we didn't had proper configuration and exception handling, it failed to execute and instances got stuck.
    Any suggestions?
    -Sree

    Hi,
    Execute the following query:
    DELETE FROM PPROCINSTANCE WHEER INSTID = "<Instance_id_to_be_deleted>";
    For soft delete execute & commit the following query:
    UPDATE PPROCINSTANCE SET STATE=64 WHERE INSTID= "<Specify_Instance_Number>";
    Hope it helps you.
    Bibhu

  • A few process instances in automatic activity  simultaneously

    Hi
    I am creating and initiating new process instance using Global Creation activity. I have put screenflow in Global Creation. An instance after completing the screenflow in Global Creation activity goes to BeginIn of the process. When I test it many times I get only  from time to time warning:
    Instance '/BackgroundUpdate#Default-1.0/157/0@xxx' is not in activity '/BackgroundUpdate#Default-1.0/doUpdate'.
    Details: Instance is in activity '/BackgroundUpdate#Default-1.0/WaitToProcessNextPackage' and has status 'RUNNING (1)'.
    "doUpdate" and "WaitToProcessNextPackage" are activities (automatic components) placed after Begin in the process ("doUpdate" is subsequent for BeginIn and "WaitToProcessNextPackage" is subsequent to "doUpdate" activity). When I get this warning no logic is executed for the process instance in "doUpdate" activity.
    How to solve it? Only one process instance created with Global Creation activity can be in one automatic activity? If there two process instances simultaneously in automatic activity, then one them won't be processed?
    Thank you in advance
    Regards
    Peter
    Edited by: Piotr85 on Apr 21, 2010 6:03 AM

    what does they means by service thing here,,,,and how do we specify it? or use it?
    Any application running in Oracle RAC clusterware is considered as a service. What is a service in the windows,its kinda same. If its a part of RAC and an application and running,its service.
    Read from here about services,
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14220/mgmt_db.htm#sthref2266
    If you don't know RAC yet, better is to leave it.Its the core of RAC if you ask me.
    does resource_consumer_grp and Service name parameter in job class definition are mutual exclusive?or not
    Did you check in the docs for the same?
    HTH
    Aman....

  • Exception when begin process via Global Automatic JMS task

    I have a process that works when I invoke it via a global creation task. However, when I try to invoke it automatically via a global automatic task listening to a JMS queue, I get the following exceptions and the instance fails.
    An exception occurred while executing a transaction. Details:
    java.lang.ClassNotFoundException: xobject.CandidateManagement.CandidateList$CandidatesGroup
    java.lang.ClassNotFoundException: java.lang.ClassNotFoundException: xobject.CandidateManagement.CandidateList$CandidatesGroup
         at fuego.lang.JavaClass.loadClass(JavaClass.java:945)
         at fuego.lang.JavaClass.loadByJavaType(JavaClass.java:902)
         at fuego.lang.JavaClass.loadByJavaType(JavaClass.java:874)
         at fuego.lang.JavaClass.loadByJavaType(JavaClass.java:868)
         at fuego.lang.JavaClass.forName(JavaClass.java:271)
         at xobject.CandidateManagement.CandidateList.<init>(CandidateList.xcdl)
         at JMSPrototype3.ChooseCandidateCustomer.Default_1_0.Instance.<init>(Instance.xcdl)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
         at java.lang.reflect.Constructor.newInstance(Unknown Source)
         at java.lang.Class.newInstance0(Unknown Source)
         at java.lang.Class.newInstance(Unknown Source)
         at fuego.server.execution.GlobalAutomaticJMSListeningHelper.executeJmsListener(GlobalAutomaticJMSListeningHelper.java:86)
         at fuego.server.AbstractProcessBean$42.execute(AbstractProcessBean.java:2771)
         at fuego.server.execution.DefaultEngineExecution$AtomicExecutionTA.runTransaction(DefaultEngineExecution.java:302)
         at fuego.transaction.TransactionAction.startBaseTransaction(TransactionAction.java:470)
         at fuego.transaction.TransactionAction.startTransaction(TransactionAction.java:551)
         at fuego.transaction.TransactionAction.start(TransactionAction.java:212)
         at fuego.server.execution.DefaultEngineExecution.executeImmediate(DefaultEngineExecution.java:123)
         at fuego.server.execution.EngineExecution.executeImmediate(EngineExecution.java:66)
         at fuego.server.AbstractProcessBean.runGlobalJmsActivity(AbstractProcessBean.java:2777)
         at fuego.server.execution.GlobalJMSExecutor$1.run(GlobalJMSExecutor.java:113)
         at fuego.component.Message.process(Message.java:578)
         at fuego.component.ExecutionThread.processMessage(ExecutionThread.java:772)
         at fuego.component.ExecutionThread.processBatch(ExecutionThread.java:747)
         at fuego.component.ExecutionThread.doProcessBatch(ExecutionThread.java:143)
         at fuego.component.ExecutionThread.doProcessBatch(ExecutionThread.java:135)
         at fuego.fengine.FEngineProcessBean.processBatch(FEngineProcessBean.java:248)
         at fuego.component.ExecutionThread.work(ExecutionThread.java:831)
         at fuego.component.ExecutionThread.run(ExecutionThread.java:409)
    Process execution engine execution error.
    Caused by: java.lang.ClassNotFoundException: xobject.CandidateManagement.CandidateList$CandidatesGroup
    fuego.papi.impl.EngineExecutionException: Process execution engine execution error.
         at fuego.server.execution.DefaultEngineExecution.executeImmediate(DefaultEngineExecution.java:139)
         at fuego.server.execution.EngineExecution.executeImmediate(EngineExecution.java:66)
         at fuego.server.AbstractProcessBean.runGlobalJmsActivity(AbstractProcessBean.java:2777)
         at fuego.server.execution.GlobalJMSExecutor$1.run(GlobalJMSExecutor.java:113)
         at fuego.component.Message.process(Message.java:578)
         at fuego.component.ExecutionThread.processMessage(ExecutionThread.java:772)
         at fuego.component.ExecutionThread.processBatch(ExecutionThread.java:747)
         at fuego.component.ExecutionThread.doProcessBatch(ExecutionThread.java:143)
         at fuego.component.ExecutionThread.doProcessBatch(ExecutionThread.java:135)
         at fuego.fengine.FEngineProcessBean.processBatch(FEngineProcessBean.java:248)
         at fuego.component.ExecutionThread.work(ExecutionThread.java:831)
         at fuego.component.ExecutionThread.run(ExecutionThread.java:409)
    Caused by: java.lang.ClassNotFoundException: java.lang.ClassNotFoundException: xobject.CandidateManagement.CandidateList$CandidatesGroup
         at fuego.lang.JavaClass.loadClass(JavaClass.java:945)
         at fuego.lang.JavaClass.loadByJavaType(JavaClass.java:902)
         at fuego.lang.JavaClass.loadByJavaType(JavaClass.java:874)
         at fuego.lang.JavaClass.loadByJavaType(JavaClass.java:868)
         at fuego.lang.JavaClass.forName(JavaClass.java:271)
         at xobject.CandidateManagement.CandidateList.<init>(CandidateList.xcdl)
         at JMSPrototype3.ChooseCandidateCustomer.Default_1_0.Instance.<init>(Instance.xcdl)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
         at java.lang.reflect.Constructor.newInstance(Unknown Source)
         at java.lang.Class.newInstance0(Unknown Source)
         at java.lang.Class.newInstance(Unknown Source)
         at fuego.server.execution.GlobalAutomaticJMSListeningHelper.executeJmsListener(GlobalAutomaticJMSListeningHelper.java:86)
         at fuego.server.AbstractProcessBean$42.execute(AbstractProcessBean.java:2771)
         at fuego.server.execution.DefaultEngineExecution$AtomicExecutionTA.runTransaction(DefaultEngineExecution.java:302)
         at fuego.transaction.TransactionAction.startBaseTransaction(TransactionAction.java:470)
         at fuego.transaction.TransactionAction.startTransaction(TransactionAction.java:551)
         at fuego.transaction.TransactionAction.start(TransactionAction.java:212)
         at fuego.server.execution.DefaultEngineExecution.executeImmediate(DefaultEngineExecution.java:123)
         ... 11 more

    Hi,
    Sure this is just my confusion, but if I'm reading this correctly, you're trying to use an instance variable in a Global Automatic.
    If this is the case, I know this sounds odd, but you don't have access to instance variables inside a Global Automatic. You can create an instance inside the logic of one of these activities if you call the Fuego.Lib.ProcessInstance method "createInstance". For this method you'll notice that one of the parameters it expects is a Any[String]. You'll need to populate this hash table to set instance variable in the instance you're creating.
    Hth,
    Dan

  • Invoke process from method implementation of automatic activity

    Hi,
    I want to invoke a business process from automatic activity of another business process deployed on same engine and in same project as well. Please provide steps, if possible for the same.
    Thanks in advance.

    Hi Ketan,
    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:
    // "args" is an associative string array (Any[String])
    argsIn as Any[String]
    // this assumes that the Begin activity has two argument variables
    //   named "nameArg" and "amountArg" and you're setting them
    //   to the variables "name" and "amount" respectively
    argsIn["someArgVarName"] = "Hello"
    argsIn["someBpmObject"] = 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[someArgVarName] = "Hello"
    argsIn[someBpmObject] = myBpmObject
    . . .Here is the correct syntax:
    // this *WILL* work
    argsIn["someArgVarName"] = "Hello"
    argsIn["someBpmObject"] = 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 "someArgVarName" and a BPM Object incoming argument called "someBpmObject".
    Hope this helps,
    Dan

  • Automatic batch determination in process orders

    Hi,
    How batch determination can be done automatically for components in process orders?
    regards,
    Mohit Goyal

    Dear,
    Define the batch determination search strategy for process order in COB1 with sort rule in CU70.
    On the initial screen of your application choose Logistics>centrel function>batch management>Batch determination>For process order -->Batch search strategy --> Create.
    On the initial screen of your application choose Batch search strategy -->Create.
    Choose the strategy type, say choose co02
    Choose the key combination-
    Enter the required dat-->say plant ,production order type, product,valid from and component for which you want to have this
    Choose Selection criteria push button. Choose a sort sequence.
    If no values have been entered, enter the selection class and the characteristic values.
    Go back to the screen on which you create a batch search strategy.
    Choose Sort if required(it should be defined earlier(in CU70- here you are giving the charateristic name on which you want to sort)
    For component you need to use MBC1 with search stratgey as ME01 for your plant movement type and material and assign the sort rule and search procedure here.
    Check also in COR4, for the combination of plant and order type...you have selected search procedure-CO0001
    Batch management> Batch serach procedure allocation and check activation
    T.Code to be looked specifically OMCG , CORC
    Hope it will help you.
    Regards,
    R.Brahmankar
    Edited by: R Brahmankar on Nov 11, 2008 11:31 AM

  • Invocation error in Java Embedding activity of BPEL process in 10g

    Hi,
    I am facing an issue as below in Java embedding activity of BPEL process in 10g...
    Could not invoke: "GTM servlet URL" with verb: POST and context: null
    and the code in java embedding activity is as below...
    // create a new rest invoker stub
    RestInvocation invocation = new RestInvocation();
    org.w3c.dom.Element callOtm_process_InputVariable = (org.w3c.dom.Element)getVariableData("Variable_GTMTransmission");
    // get the result el - so we can derive the namespace needed
    org.w3c.dom.Element callOtm_process_OutputVariable = (org.w3c.dom.Element)getVariableData("Variable_GTMTransmissionAck");
    String GTMURL = "GTM servlet URL";
    try
    callOtm_process_OutputVariable = invocation.invoke
    (callOtm_process_InputVariable, "GET", GTMURL, null,
    callOtm_process_OutputVariable.getNamespaceURI());
    setVariableData("Variable_GTMTransmissionAck", callOtm_process_OutputVariable);
    } finally
    addAuditTrailEntry(invocation.getAuditAsString());
    If anybody is aware of this error, please help me to resolve this issue.
    Thanks in advance.

    Try copy the code from java embedding and paste it to eclipse and run it from there. you will find the exact issue.
    Thanks

Maybe you are looking for