You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ode.apache.org by Denis Weerasiri <dd...@gmail.com> on 2009/03/02 13:06:16 UTC
How to add a breakpoint to a process activity.
Hi all,
I'm trying to test the methods of
"org.apache.ode.bpel.engine.BpelManagementFacadeImpl" class.
public class BpelMagFacadeTest {
BasicActivities20Test = null;
//org.apache.ode.test.BasicActivities20Test
BpelManagementFacade facade = null;
//org.apache.ode.bpel.pmapi.BpelManagementFacade
ProcessAndInstanceManagementImpl mgtImpl = null;
//org.apache.ode.bpel.engine.ProcessAndInstanceManagementImpl
public BpelMagFacadeTest(){
testCase = new BasicActivities20Test();
testCase.setup();
//setup the BpelServer
facade = new BpelManagementFacadeImpl(testCase._server,
testCase.store);
mgtImpl = new ProcessAndInstanceManagementImpl(testCase._server,
testCase.store); //initiate the ManagementAPI
}
public static void main(String[] args) throws Throwable {
BpelMagFacadeTest test = new BpelMagFacadeTest();
test.testCase.testHelloWorld2();
//initiate the "HelloWorld" process
test.facade.addGlobalActivityBreakpoint("{
http://ode/bpel/unit-test}HelloWorld2-1", "assign1"); //add a
globalBreakPoint to the activity "assign1"
org.apache.ode.bpel.pmapi.TProcessInfoList processList =
test.mgtImpl.listAllProcesses().getProcessInfoList();
//retrieving the process info
}
}
What I get in "processList" is as follows,
<process-info xmlns="http://www.apache.org/ode/pmapi/types/2006/08/02/">
<pid>{http://ode/bpel/unit-test}HelloWorld2-1</pid>
<status>ACTIVE</status>
<version>1</version>
<definition-info>
<process-name xmlns:unit="http://ode/bpel/unit-test
">unit:HelloWorld2</process-name>
</definition-info>
<deployment-info>
<package>HelloWorld2</package>
<document>HelloWorld2.bpel</document>
<deploy-date>2009-03-02T17:24:35.578+06:00</deploy-date>
<deployer/>
</deployment-info>
<instance-summary>
<instances state="ACTIVE" count="0"/>
<instances state="COMPLETED" count="0"/>
<instances state="ERROR" count="0"/>
<instances state="FAILED" count="0"/>
<instances state="SUSPENDED" count="0"/>
<instances state="TERMINATED" count="0"/>
</instance-summary>
</process-info>
According to retrieved information the process hasn't been suspended.
My problem is ...
- Is this the correct way to add an breakpoint to an activity?
Please help on this matter.
Best Regards,
Denis Weerasiri.
Re: How to add a breakpoint to a process activity.
Posted by Milinda Pathirage <mi...@gmail.com>.
AFAIK you can't suspend a process. You can only suspend a instance.
On Mon, Mar 2, 2009 at 5:36 PM, Denis Weerasiri <dd...@gmail.com>wrote:
> Hi all,
>
> I'm trying to test the methods of
> "org.apache.ode.bpel.engine.BpelManagementFacadeImpl" class.
>
> public class BpelMagFacadeTest {
> BasicActivities20Test = null;
> //org.apache.ode.test.BasicActivities20Test
> BpelManagementFacade facade = null;
> //org.apache.ode.bpel.pmapi.BpelManagementFacade
> ProcessAndInstanceManagementImpl mgtImpl = null;
> //org.apache.ode.bpel.engine.ProcessAndInstanceManagementImpl
>
> public BpelMagFacadeTest(){
> testCase = new BasicActivities20Test();
> testCase.setup();
> //setup the BpelServer
>
> facade = new BpelManagementFacadeImpl(testCase._server,
> testCase.store);
> mgtImpl = new ProcessAndInstanceManagementImpl(testCase._server,
> testCase.store); //initiate the ManagementAPI
> }
>
> public static void main(String[] args) throws Throwable {
> BpelMagFacadeTest test = new BpelMagFacadeTest();
>
> test.testCase.testHelloWorld2();
> //initiate the "HelloWorld" process
> test.facade.addGlobalActivityBreakpoint("{
> http://ode/bpel/unit-test}HelloWorld2-1<http://ode/bpel/unit-test%7DHelloWorld2-1>",
> "assign1"); //add a
> globalBreakPoint to the activity "assign1"
>
> org.apache.ode.bpel.pmapi.TProcessInfoList processList =
> test.mgtImpl.listAllProcesses().getProcessInfoList();
> //retrieving the process info
> }
>
>
> }
>
> What I get in "processList" is as follows,
>
> <process-info xmlns="http://www.apache.org/ode/pmapi/types/2006/08/02/">
> <pid>{http://ode/bpel/unit-test}HelloWorld2-1<http://ode/bpel/unit-test%7DHelloWorld2-1>
> </pid>
> <status>ACTIVE</status>
> <version>1</version>
> <definition-info>
> <process-name xmlns:unit="http://ode/bpel/unit-test
> ">unit:HelloWorld2</process-name>
> </definition-info>
> <deployment-info>
> <package>HelloWorld2</package>
> <document>HelloWorld2.bpel</document>
> <deploy-date>2009-03-02T17:24:35.578+06:00</deploy-date>
> <deployer/>
> </deployment-info>
> <instance-summary>
> <instances state="ACTIVE" count="0"/>
> <instances state="COMPLETED" count="0"/>
> <instances state="ERROR" count="0"/>
> <instances state="FAILED" count="0"/>
> <instances state="SUSPENDED" count="0"/>
> <instances state="TERMINATED" count="0"/>
> </instance-summary>
> </process-info>
>
> According to retrieved information the process hasn't been suspended.
>
> My problem is ...
> - Is this the correct way to add an breakpoint to an activity?
>
> Please help on this matter.
>
> Best Regards,
> Denis Weerasiri.
>
--
http://mpathirage.com
http://wso2.org "Oxygen for Web Service Developers"
http://wsaxc.blogspot.com "Web Services With Axis2/C"