bpel engine source code

View: New views
16 Messages — Rating Filter:   Alert me  

bpel engine source code

by rconfalonieri :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi all,

I may be interested to modify to bpel engine code to adapt it to do some extra stuff, which I'll need in a project I'm involved into.
As an example, I would like to be able to deploy BPEL processes to the server straight from the java code of my system. As I saw, that management and monitoring APIs do not provide such functionality.
Right now I'm simply calling the ant script deployment from a Java funcion, but I'd like to know if there is the possibility to have access straight to the BPEL engine code and modify it.

thanks and all the best,
roberto

Re: bpel engine source code

by Philip Varghese-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Roberto,
You have to request a project role in open-esb/open-jbi-components by
registering at the get involved page  
https://open-esb.dev.java.net/GetInvolved.html.
Once you have been granted developer role access by the owners then you
will be able to checkout/commit changes to jbi components.

Please share details of your requirement and design on the developer
email alias.

For the bpel engine , you have to checkout source from the
open-jbi-components repository at
https://open-jbi-components.dev.java.net/source/browse/open-jbi-components/.
build instructions are at
https://open-jbi-components.dev.java.net/public/cvs.html.
bpel engine source is at
https://open-jbi-components.dev.java.net/source/browse/open-jbi-components/ojc-core/bpelse/

Junit testing for regression is described in detail in the wiki page
http://wiki.open-esb.java.net/Wiki.jsp?page=BPELSEJunitTesting.

Extensive driver test cases are provided in the package
https://open-jbi-components.dev.java.net/source/browse/open-jbi-components/driver-tests/bpelse/.

Thanks
Philip

rconfalonieri wrote:

> Hi all,
>
> I may be interested to modify to bpel engine code to adapt it to do some
> extra stuff, which I'll need in a project I'm involved into.
> As an example, I would like to be able to deploy BPEL processes to the
> server straight from the java code of my system. As I saw, that management
> and monitoring APIs do not provide such functionality.
> Right now I'm simply calling the ant script deployment from a Java funcion,
> but I'd like to know if there is the possibility to have access straight to
> the BPEL engine code and modify it.
>
> thanks and all the best,
> roberto
>  

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@...
For additional commands, e-mail: dev-help@...


Re: bpel engine source code

by Kiran Bhumana-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

What sort of modifications are you referring to? Do you want to change
the engine code dynamically through management APIs or do you want to
change the engine code and install it again?

Kiran B.

rconfalonieri wrote:

> Hi all,
>
> I may be interested to modify to bpel engine code to adapt it to do some
> extra stuff, which I'll need in a project I'm involved into.
> As an example, I would like to be able to deploy BPEL processes to the
> server straight from the java code of my system. As I saw, that management
> and monitoring APIs do not provide such functionality.
> Right now I'm simply calling the ant script deployment from a Java funcion,
> but I'd like to know if there is the possibility to have access straight to
> the BPEL engine code and modify it.
>
> thanks and all the best,
> roberto
>  

--
Kiran Bhumana
Open ESB Community (http://open-esb.org)


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@...
For additional commands, e-mail: dev-help@...


Re: bpel engine source code

by rconfalonieri :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Kiran,

thanks for replying.

I am not too sure to have understood what you mean by changing the code dynamically, however my idea would be to add some APIs to add functionality, and further on, I might need to change the core engine itself. It may be (I do not really now right now exactly, as I am still in a design phase) that I'll have to modify the engine to let it communicate to other components we'll have in the system.
Basically what we have, is an agent shell for supporting contract management and execution, and the execution is delegated to a component that is called workflow manager, which basically "wraps" the bpel engine. (all this work is carried on in the context of an european project IST-CONTRACT, I am putting the link just if you are curious to have a look at it  www.ist-contract.org and http://sourceforge.net/projects/ist-contract/).

thanks and all the best,
roberto

Kiran Bhumana-2 wrote:
What sort of modifications are you referring to? Do you want to change
the engine code dynamically through management APIs or do you want to
change the engine code and install it again?

Kiran B.

rconfalonieri wrote:
> Hi all,
>
> I may be interested to modify to bpel engine code to adapt it to do some
> extra stuff, which I'll need in a project I'm involved into.
> As an example, I would like to be able to deploy BPEL processes to the
> server straight from the java code of my system. As I saw, that management
> and monitoring APIs do not provide such functionality.
> Right now I'm simply calling the ant script deployment from a Java funcion,
> but I'd like to know if there is the possibility to have access straight to
> the BPEL engine code and modify it.
>
> thanks and all the best,
> roberto
>  

--
Kiran Bhumana
Open ESB Community (http://open-esb.org)


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@open-esb.dev.java.net
For additional commands, e-mail: dev-help@open-esb.dev.java.net

Re: bpel engine source code

by Gopalan Suresh Raj :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.
Hello Robnerto

You would not need to invoke ant scripts from your java code to deploy your service assembly.

Please find a simple Java program that exercises the Common Management and Monitoring API to deploy, start, stop, shutdown and undeploy a Service Assembly.

To execute attached program, you will need to include <GF_INSTALL_ROOT>/jbi/lib/jbi-admin-common.jar

See if this suffices to satisfy your requirement.

Cheers
Gopalan.

rconfalonieri wrote:
Hi Kiran,

thanks for replying. 

I am not too sure to have understood what you mean by changing the code
dynamically, however my idea would be to add some APIs to add functionality,
and further on, I might need to change the core engine itself. It may be (I
do not really now right now exactly, as I am still in a design phase) that
I'll have to modify the engine to let it communicate to other components
we'll have in the system.
Basically what we have, is an agent shell for supporting contract management
and execution, and the execution is delegated to a component that is called
workflow manager, which basically "wraps" the bpel engine. (all this work is
carried on in the context of an european project IST-CONTRACT, I am putting
the link just if you are curious to have a look at it ;-)
www.ist-contract.org and http://sourceforge.net/projects/ist-contract/).

thanks and all the best,
roberto


Kiran Bhumana-2 wrote:
  
What sort of modifications are you referring to? Do you want to change 
the engine code dynamically through management APIs or do you want to 
change the engine code and install it again?

Kiran B.

rconfalonieri wrote:
    
Hi all,

I may be interested to modify to bpel engine code to adapt it to do some
extra stuff, which I'll need in a project I'm involved into. 
As an example, I would like to be able to deploy BPEL processes to the
server straight from the java code of my system. As I saw, that
management
and monitoring APIs do not provide such functionality.
Right now I'm simply calling the ant script deployment from a Java
funcion,
but I'd like to know if there is the possibility to have access straight
to
the BPEL engine code and modify it.

thanks and all the best,
roberto
  
      
-- 
Kiran Bhumana
Open ESB Community (http://open-esb.org)


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@...
For additional commands, e-mail: dev-help@...



    

  



package test;

import com.sun.esb.management.api.deployment.DeploymentService;
import com.sun.esb.management.api.runtime.RuntimeManagementService;
import com.sun.esb.management.client.ManagementClient;
import com.sun.esb.management.client.ManagementClientFactory;
import com.sun.esb.management.common.ManagementRemoteException;

/**
 * @author graj
 */
public class TestDeployment {
    /**
     * @param args
     */
    public static void main(String[] args) {
        String applicationArchive = "C:/test/NetBeansProjects/SynchronousSample/SynchronousSampleApplication/dist/SynchronousSampleApplication.zip";
        String host = "licalhost", userName = "admin", password = "adminadmin";
        int port = 8686; // default RMI Port
        String targetName = "server";
        String serviceAssemblyName = "";
        try {
            // Get a client connection
            ManagementClient client = ManagementClientFactory.getInstance(host, port, userName, password);
            // Get the Deployment Service
            DeploymentService deploymentService = client.getDeploymentService();
            // Deploy the Application
            serviceAssemblyName = deploymentService.deployServiceAssembly(applicationArchive, targetName);
            // Get the Runtime Management Service
            RuntimeManagementService lifecycleService = client.getRuntimeManagementService();
            // Start the application
            serviceAssemblyName = lifecycleService.startServiceAssembly(serviceAssemblyName, targetName);
            // Stop the application
            serviceAssemblyName = lifecycleService.stopServiceAssembly(serviceAssemblyName, targetName);
            // shutdown the application
            serviceAssemblyName = lifecycleService.shutdownServiceAssembly(serviceAssemblyName, targetName);
            // undeploy the application
            serviceAssemblyName = deploymentService.undeployServiceAssembly(serviceAssemblyName, targetName);
        } catch (ManagementRemoteException e) {
            e.printStackTrace();
        }
    }
}


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@...
For additional commands, e-mail: dev-help@...

Re: bpel engine source code

by Gabriel Badescu :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello Roberto - since you mention a workflow manager have you looked at
the WLMSE (http://wiki.open-esb.java.net/Wiki.jsp?page=WLMSE) as a
potential component of your system?
Thanks,
Gabe

rconfalonieri wrote:

> Hi Kiran,
>
> thanks for replying.
>
> I am not too sure to have understood what you mean by changing the code
> dynamically, however my idea would be to add some APIs to add functionality,
> and further on, I might need to change the core engine itself. It may be (I
> do not really now right now exactly, as I am still in a design phase) that
> I'll have to modify the engine to let it communicate to other components
> we'll have in the system.
> Basically what we have, is an agent shell for supporting contract management
> and execution, and the execution is delegated to a component that is called
> workflow manager, which basically "wraps" the bpel engine. (all this work is
> carried on in the context of an european project IST-CONTRACT, I am putting
> the link just if you are curious to have a look at it ;-)
> www.ist-contract.org and http://sourceforge.net/projects/ist-contract/).
>
> thanks and all the best,
> roberto
>
>
> Kiran Bhumana-2 wrote:
>  
>> What sort of modifications are you referring to? Do you want to change
>> the engine code dynamically through management APIs or do you want to
>> change the engine code and install it again?
>>
>> Kiran B.
>>
>> rconfalonieri wrote:
>>    
>>> Hi all,
>>>
>>> I may be interested to modify to bpel engine code to adapt it to do some
>>> extra stuff, which I'll need in a project I'm involved into.
>>> As an example, I would like to be able to deploy BPEL processes to the
>>> server straight from the java code of my system. As I saw, that
>>> management
>>> and monitoring APIs do not provide such functionality.
>>> Right now I'm simply calling the ant script deployment from a Java
>>> funcion,
>>> but I'd like to know if there is the possibility to have access straight
>>> to
>>> the BPEL engine code and modify it.
>>>
>>> thanks and all the best,
>>> roberto
>>>  
>>>      
>> --
>> Kiran Bhumana
>> Open ESB Community (http://open-esb.org)
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@...
>> For additional commands, e-mail: dev-help@...
>>
>>
>>
>>    
>
>  

--
Gabriel Badescu
Open ESB Community (http://open-esb.org)  



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@...
For additional commands, e-mail: dev-help@...


Re: bpel engine source code

by rconfalonieri :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Gabe,

thanks a lot, will have a llok at it!

roberto

Gabriel Badescu wrote:
Hello Roberto - since you mention a workflow manager have you looked at
the WLMSE (http://wiki.open-esb.java.net/Wiki.jsp?page=WLMSE) as a
potential component of your system?
Thanks,
Gabe

rconfalonieri wrote:
> Hi Kiran,
>
> thanks for replying.
>
> I am not too sure to have understood what you mean by changing the code
> dynamically, however my idea would be to add some APIs to add functionality,
> and further on, I might need to change the core engine itself. It may be (I
> do not really now right now exactly, as I am still in a design phase) that
> I'll have to modify the engine to let it communicate to other components
> we'll have in the system.
> Basically what we have, is an agent shell for supporting contract management
> and execution, and the execution is delegated to a component that is called
> workflow manager, which basically "wraps" the bpel engine. (all this work is
> carried on in the context of an european project IST-CONTRACT, I am putting
> the link just if you are curious to have a look at it ;-)
> www.ist-contract.org and http://sourceforge.net/projects/ist-contract/).
>
> thanks and all the best,
> roberto
>
>
> Kiran Bhumana-2 wrote:
>  
>> What sort of modifications are you referring to? Do you want to change
>> the engine code dynamically through management APIs or do you want to
>> change the engine code and install it again?
>>
>> Kiran B.
>>
>> rconfalonieri wrote:
>>    
>>> Hi all,
>>>
>>> I may be interested to modify to bpel engine code to adapt it to do some
>>> extra stuff, which I'll need in a project I'm involved into.
>>> As an example, I would like to be able to deploy BPEL processes to the
>>> server straight from the java code of my system. As I saw, that
>>> management
>>> and monitoring APIs do not provide such functionality.
>>> Right now I'm simply calling the ant script deployment from a Java
>>> funcion,
>>> but I'd like to know if there is the possibility to have access straight
>>> to
>>> the BPEL engine code and modify it.
>>>
>>> thanks and all the best,
>>> roberto
>>>  
>>>      
>> --
>> Kiran Bhumana
>> Open ESB Community (http://open-esb.org)
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@open-esb.dev.java.net
>> For additional commands, e-mail: dev-help@open-esb.dev.java.net
>>
>>
>>
>>    
>
>  

--
Gabriel Badescu
Open ESB Community (http://open-esb.org)  



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@open-esb.dev.java.net
For additional commands, e-mail: dev-help@open-esb.dev.java.net

Re: bpel engine source code

by rconfalonieri :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Gopalan,

thanks for replying. Yes, definetely I can use them to deploy the SA. However, before I have BPELs templates (which are associated to a contract), which I need to fill with custom information at runtime (such as IP addresses and Ports), and first compile them to generate the required service assemblies. FOr this reason, I was thinking to use the ant script, provided by netbeans, which I have modified a bit to let them be independent from netbeans. Actually I have done somth that is not very smart, i.e. I have run into the scripts to see the library needed, and copied the library to a /lib folder to be provided with all the system deplyment package we'll provide.
Do you maybe know, or may point me a smarter approach?  

thanks and all the best,
roberto

Gopalan Suresh Raj wrote:
Hello Robnerto

You would not need to invoke ant scripts from your java code to deploy
your service assembly.

Please find a simple Java program that exercises the Common Management
and Monitoring API to deploy, start, stop, shutdown and undeploy a
Service Assembly.

To execute attached program, you will need to include <GF_INSTALL_ROOT>/jbi/lib/jbi-admin-common.jar

See if this suffices to satisfy your requirement.

Cheers
Gopalan.

rconfalonieri wrote:

  Hi Kiran,

thanks for replying.

I am not too sure to have understood what you mean by changing the code
dynamically, however my idea would be to add some APIs to add functionality,
and further on, I might need to change the core engine itself. It may be (I
do not really now right now exactly, as I am still in a design phase) that
I'll have to modify the engine to let it communicate to other components
we'll have in the system.
Basically what we have, is an agent shell for supporting contract management
and execution, and the execution is delegated to a component that is called
workflow manager, which basically "wraps" the bpel engine. (all this work is
carried on in the context of an european project IST-CONTRACT, I am putting
the link just if you are curious to have a look at it ;-)
www.ist-contract.org  and http://sourceforge.net/projects/ist-contract/ ).

thanks and all the best,
roberto


Kiran Bhumana-2 wrote:
 
 
    What sort of modifications are you referring to? Do you want to change
the engine code dynamically through management APIs or do you want to
change the engine code and install it again?

Kiran B.

rconfalonieri wrote:
   
   
      Hi all,

I may be interested to modify to bpel engine code to adapt it to do some
extra stuff, which I'll need in a project I'm involved into.
As an example, I would like to be able to deploy BPEL processes to the
server straight from the java code of my system. As I saw, that
management
and monitoring APIs do not provide such functionality.
Right now I'm simply calling the ant script deployment from a Java
funcion,
but I'd like to know if there is the possibility to have access straight
to
the BPEL engine code and modify it.

thanks and all the best,
roberto
 
     
   
    --
Kiran Bhumana
Open ESB Community ( http://open-esb.org )


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@open-esb.dev.java.net
For additional commands, e-mail: dev-help@open-esb.dev.java.net



   
 
 
 


--



 
   
      Implement SOA today.
   
   
      Visit
The Open ESB Community (http://open-esb.org/)
     
   
   
      Visit Web Cornucopia
(http://blogs.sun.com/gopalan/)
     
   
   
     
     
      ? Grab this Headline Animator
     
   
 

















 
package test;

import com.sun.esb.management.api.deployment.DeploymentService;
import com.sun.esb.management.api.runtime.RuntimeManagementService;
import com.sun.esb.management.client.ManagementClient;
import com.sun.esb.management.client.ManagementClientFactory;
import com.sun.esb.management.common.ManagementRemoteException;

/**
 * @author graj
 */
public class TestDeployment {
    /**
     * @param args
     */
    public static void main(String[] args) {
        String applicationArchive = "C:/test/NetBeansProjects/SynchronousSample/SynchronousSampleApplication/dist/SynchronousSampleApplication.zip";
        String host = "licalhost", userName = "admin", password = "adminadmin";
        int port = 8686; // default RMI Port
        String targetName = "server";
        String serviceAssemblyName = "";
        try {
            // Get a client connection
            ManagementClient client = ManagementClientFactory.getInstance(host, port, userName, password);
            // Get the Deployment Service
            DeploymentService deploymentService = client.getDeploymentService();
            // Deploy the Application
            serviceAssemblyName = deploymentService.deployServiceAssembly(applicationArchive, targetName);
            // Get the Runtime Management Service
            RuntimeManagementService lifecycleService = client.getRuntimeManagementService();
            // Start the application
            serviceAssemblyName = lifecycleService.startServiceAssembly(serviceAssemblyName, targetName);
            // Stop the application
            serviceAssemblyName = lifecycleService.stopServiceAssembly(serviceAssemblyName, targetName);
            // shutdown the application
            serviceAssemblyName = lifecycleService.shutdownServiceAssembly(serviceAssemblyName, targetName);
            // undeploy the application
            serviceAssemblyName = deploymentService.undeployServiceAssembly(serviceAssemblyName, targetName);
        } catch (ManagementRemoteException e) {
            e.printStackTrace();
        }
    }
}


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@open-esb.dev.java.net
For additional commands, e-mail: dev-help@open-esb.dev.java.net

Re: bpel engine source code

by Gopalan Suresh Raj :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.
Hello Roberto

I'm glad you found the code sample useful.

Now to solve your other problem, instead of having to hard-code your connectivity information into each service unit and recompiling, have you looked at using the  Application Configurations and Application Variables features (and Application Environment Verification) available in Open ESB?

You might find these useful. Please peruse:
http://wiki.open-esb.java.net/Wiki.jsp?page=ApplicationConfiguration
http://wiki.open-esb.java.net/Wiki.jsp?page=HTTPBCEnhancedEnvironmentVariables
http://wiki.open-esb.java.net/Wiki.jsp?page=SierraUpdateAppVerifier


Cheers
Gopalan.


rconfalonieri wrote:
Hi Gopalan,

thanks for replying. Yes, definetely I can use them to deploy the SA.
However, before I have BPELs templates (which are associated to a contract),
which I need to fill with custom information at runtime (such as IP
addresses and Ports), and first compile them to generate the required
service assemblies. FOr this reason, I was thinking to use the ant script,
provided by netbeans, which I have modified a bit to let them be independent
from netbeans. Actually I have done somth that is not very smart, i.e. I
have run into the scripts to see the library needed, and copied the library
to a /lib folder to be provided with all the system deplyment package we'll
provide.
Do you maybe know, or may point me a smarter approach? :-) 

thanks and all the best,
roberto 


Gopalan Suresh Raj wrote:
  
Hello Robnerto 

You would not need to invoke ant scripts from your java code to deploy
your service assembly. 

Please find a simple Java program that exercises the Common Management
and Monitoring API to deploy, start, stop, shutdown and undeploy a
Service Assembly. 

To execute attached program, you will need to include
&lt;GF_INSTALL_ROOT&gt;/jbi/lib/jbi-admin-common.jar 

See if this suffices to satisfy your requirement. 

Cheers 
Gopalan. 

rconfalonieri wrote:

  Hi Kiran,

thanks for replying. 

I am not too sure to have understood what you mean by changing the code
dynamically, however my idea would be to add some APIs to add
functionality,
and further on, I might need to change the core engine itself. It may be
(I
do not really now right now exactly, as I am still in a design phase) that
I'll have to modify the engine to let it communicate to other components
we'll have in the system.
Basically what we have, is an agent shell for supporting contract
management
and execution, and the execution is delegated to a component that is
called
workflow manager, which basically "wraps" the bpel engine. (all this work
is
carried on in the context of an european project IST-CONTRACT, I am
putting
the link just if you are curious to have a look at it ;-)
www.ist-contract.org  and http://sourceforge.net/projects/ist-contract/ ).

thanks and all the best,
roberto


Kiran Bhumana-2 wrote:
  
  
    What sort of modifications are you referring to? Do you want to change 
the engine code dynamically through management APIs or do you want to 
change the engine code and install it again?

Kiran B.

rconfalonieri wrote:
    
    
      Hi all,

I may be interested to modify to bpel engine code to adapt it to do some
extra stuff, which I'll need in a project I'm involved into. 
As an example, I would like to be able to deploy BPEL processes to the
server straight from the java code of my system. As I saw, that
management
and monitoring APIs do not provide such functionality.
Right now I'm simply calling the ant script deployment from a Java
funcion,
but I'd like to know if there is the possibility to have access straight
to
the BPEL engine code and modify it.

thanks and all the best,
roberto
  
      
    
    -- 
Kiran Bhumana
Open ESB Community ( http://open-esb.org )


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@... 
For additional commands, e-mail: dev-help@... 



    
  
  
  


-- 



  
    
      Implement SOA today.
    
    
      Visit
The Open ESB Community (http://open-esb.org/) 
      
    
    
      Visit Web Cornucopia
(http://blogs.sun.com/gopalan/) 
      
    
    
      
      
      ? Grab this Headline Animator 
      
    
  

















 
package test;

import com.sun.esb.management.api.deployment.DeploymentService;
import com.sun.esb.management.api.runtime.RuntimeManagementService;
import com.sun.esb.management.client.ManagementClient;
import com.sun.esb.management.client.ManagementClientFactory;
import com.sun.esb.management.common.ManagementRemoteException;

/**
 * @author graj
 */
public class TestDeployment {
    /**
     * @param args
     */
    public static void main(String[] args) {
        String applicationArchive =
"C:/test/NetBeansProjects/SynchronousSample/SynchronousSampleApplication/dist/SynchronousSampleApplication.zip";
        String host = "licalhost", userName = "admin", password =
"adminadmin";
        int port = 8686; // default RMI Port
        String targetName = "server";
        String serviceAssemblyName = "";
        try {
            // Get a client connection
            ManagementClient client =
ManagementClientFactory.getInstance(host, port, userName, password);
            // Get the Deployment Service
            DeploymentService deploymentService =
client.getDeploymentService();
            // Deploy the Application
            serviceAssemblyName =
deploymentService.deployServiceAssembly(applicationArchive, targetName);
            // Get the Runtime Management Service
            RuntimeManagementService lifecycleService =
client.getRuntimeManagementService();
            // Start the application
            serviceAssemblyName =
lifecycleService.startServiceAssembly(serviceAssemblyName, targetName);
            // Stop the application
            serviceAssemblyName =
lifecycleService.stopServiceAssembly(serviceAssemblyName, targetName);
            // shutdown the application
            serviceAssemblyName =
lifecycleService.shutdownServiceAssembly(serviceAssemblyName, targetName);
            // undeploy the application
            serviceAssemblyName =
deploymentService.undeployServiceAssembly(serviceAssemblyName,
targetName);
        } catch (ManagementRemoteException e) {
            e.printStackTrace();
        }
    }
}


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@...
For additional commands, e-mail: dev-help@...

    

  



Re: bpel engine source code

by rconfalonieri :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Gopalan,

thanks a lot for the pointers. They are indeed very interesting. Basically the possiblity to change the address of the service assembly would be very useful for me, as it will avoid to provide the package we'll create with all the library needed by recompilation.
I have tried the approach, but I have some problems. This may come from the fact that the example of the application configuration you provided me, its rather simple as it considered the case only to change the endpoint of the BPEL.
I have however many endpoint consumed/provided endpoint used and exposed by the BPEL as I am using wait and onMessage constructs inside the BPEL. Moreover I am consuming several Web services, whose real address its not known at design time, but only at deployment time. I have tried to create a config.properties file such this  (i'm attaching it) and excute a set of "asadmin.bat create-jbi-application-configuration.." one for each config, but is failed as I was expecting.
The other problem I have been experiencing, is that the application configuration did not allow to specify me the customization for the BPEL port, that accepts only ${HttpDefaultPort} o ${HttpsDefaultPort}.

Even if I finf the approach interesting, I was not able to fully understand how to apply it in a general way... :(

Here below the config.properties file and the script for executing the asadmin.bat coomands.

----------
# To change this template, choose Tools | Templates
# and open the template in the editor.

configurationName=purchaserBpelConfig
httpUrlLocation=http://localhost:20000/purchaserServiceService/purchaserServicePort

configurationName=supplierBpelConfig
httpUrlLocation=http://localhost:20001/SupplierServiceService/SupplierServicePort

configurationName=goodAcceptedConfig
httpUrlLocation=http://localhost:20000/GoodStatusService/goodAcceptedPTBindingPort

configurationName=workflowNotifierConfig
httpUrlLocation=http://localhost:8080/PaymentAndRefundThirdPartyService/workflowNotifierService

configurationName=goodRefusedConfig
httpUrlLocation=http://localhost:20000/GoodStatusService/goodRefusedPTBindingPort

configurationName=checkGoodConfig
httpUrlLocation=http://localhost:8080/PurchaserWS/checkGoodsWSService

configurationName=payConfig
httpUrlLocation=http://localhost:8080/PaymentAndRefundThirdPartyService/payService

configurationName=goodAvailableConfig
httpUrlLocation=http://localhost:20000/GoodAvailableService/GoodAvailablePort

configurationName=downloadConfig
httpUrlLocation=http://localhost:8080/supplierWS/downloadService

configurationName=refundStatusConfig
httpUrlLocation=http://localhost:20000/RefundStatusService/RefundStatusPort
------------------------------------
asadmin.bat create-jbi-application-configuration --component=sun-http-binding --configname=purchaserBpelConfig config.properties
asadmin.bat create-jbi-application-configuration --component=sun-http-binding --configname=supplierBpelConfig config.properties
asadmin.bat create-jbi-application-configuration --component=sun-http-binding --configname=goodAcceptedConfig config.properties
asadmin.bat create-jbi-application-configuration --component=sun-http-binding --configname=workflowNotifierConfig config.properties
asadmin.bat create-jbi-application-configuration --component=sun-http-binding --configname=goodRefusedConfig config.properties
asadmin.bat create-jbi-application-configuration --component=sun-http-binding --configname=checkGoodConfig config.properties
asadmin.bat create-jbi-application-configuration --component=sun-http-binding --configname=payConfig config.properties
asadmin.bat create-jbi-application-configuration --component=sun-http-binding --configname=goodAvailableConfig config.properties
asadmin.bat create-jbi-application-configuration --component=sun-http-binding --configname=downloadConfig config.properties
asadmin.bat create-jbi-application-configuration --component=sun-http-binding --configname=refundStatusConfig config.properties
----------------------

The error that I got when lanching the script is:
D:\contract-tools\SVN\CONTRACT\TechnologyDemo\trunk\ContractWorkflow\PurchaserApp>asadmin.bat create-jbi-application-configuration --component=sun-http-binding --configname=purchaserBpelConfig config.properties
  ERROR:(JBIMA1821)The specified name of the application configuration purchaserBpelConfig does not match the name in the application configuration data : refundStatusConfig.
CLI137 Command create-jbi-application-configuration failed.
Gopalan Suresh Raj wrote:
thanks and all the best,
roberto

Hello Roberto

I'm glad you found the code sample useful.

Now to solve your other problem, instead of having to hard-code your
connectivity information into each service unit and recompiling, have
you looked at using the  Application Configurations and Application
Variables features (and Application Environment Verification) available
in Open ESB?

You might find these useful. Please peruse:
http://wiki.open-esb.java.net/Wiki.jsp?page=ApplicationConfiguration 
http://wiki.open-esb.java.net/Wiki.jsp?page=HTTPBCEnhancedEnvironmentVariables 
http://wiki.open-esb.java.net/Wiki.jsp?page=SierraUpdateAppVerifier 


Cheers
Gopalan.


rconfalonieri wrote:

  Hi Gopalan,

thanks for replying. Yes, definetely I can use them to deploy the SA.
However, before I have BPELs templates (which are associated to a contract),
which I need to fill with custom information at runtime (such as IP
addresses and Ports), and first compile them to generate the required
service assemblies. FOr this reason, I was thinking to use the ant script,
provided by netbeans, which I have modified a bit to let them be independent
from netbeans. Actually I have done somth that is not very smart, i.e. I
have run into the scripts to see the library needed, and copied the library
to a /lib folder to be provided with all the system deplyment package we'll
provide.
Do you maybe know, or may point me a smarter approach? :-)

thanks and all the best,
roberto


Gopalan Suresh Raj wrote:
 
 
   
Hello Robnerto

You would not need to invoke ant scripts from your java code to deploy
your service assembly.

Please find a simple Java program that exercises the Common Management
and Monitoring API to deploy, start, stop, shutdown and undeploy a
Service Assembly.

To execute attached program, you will need to include
&lt;GF_INSTALL_ROOT&gt;/jbi/lib/jbi-admin-common.jar

See if this suffices to satisfy your requirement.

Cheers
Gopalan.

rconfalonieri wrote:

  Hi Kiran,

thanks for replying.

I am not too sure to have understood what you mean by changing the code
dynamically, however my idea would be to add some APIs to add
functionality,
and further on, I might need to change the core engine itself. It may be
(I
do not really now right now exactly, as I am still in a design phase) that
I'll have to modify the engine to let it communicate to other components
we'll have in the system.
Basically what we have, is an agent shell for supporting contract
management
and execution, and the execution is delegated to a component that is
called
workflow manager, which basically "wraps" the bpel engine. (all this work
is
carried on in the context of an european project IST-CONTRACT, I am
putting
the link just if you are curious to have a look at it ;-)
www.ist-contract.org   and http://sourceforge.net/projects/ist-contract/  ).

thanks and all the best,
roberto


Kiran Bhumana-2 wrote:
 
 
    What sort of modifications are you referring to? Do you want to change
the engine code dynamically through management APIs or do you want to
change the engine code and install it again?

Kiran B.

rconfalonieri wrote:
   
   
      Hi all,

I may be interested to modify to bpel engine code to adapt it to do some
extra stuff, which I'll need in a project I'm involved into.
As an example, I would like to be able to deploy BPEL processes to the
server straight from the java code of my system. As I saw, that
management
and monitoring APIs do not provide such functionality.
Right now I'm simply calling the ant script deployment from a Java
funcion,
but I'd like to know if there is the possibility to have access straight
to
the BPEL engine code and modify it.

thanks and all the best,
roberto
 
     
   
    --
Kiran Bhumana
Open ESB Community ( http://open-esb.org  )


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@open-esb.dev.java.net  
For additional commands, e-mail: dev-help@open-esb.dev.java.net  



   
 
 
 


--



 
   
      Implement SOA today.
   
   
      Visit
The Open ESB Community ( http://open-esb.org/ )
     
   
   
      Visit Web Cornucopia
( http://blogs.sun.com/gopalan/ )
     
   
   
     
     
      ? Grab this Headline Animator
     
   
 

















 
package test;

import com.sun.esb.management.api.deployment.DeploymentService;
import com.sun.esb.management.api.runtime.RuntimeManagementService;
import com.sun.esb.management.client.ManagementClient;
import com.sun.esb.management.client.ManagementClientFactory;
import com.sun.esb.management.common.ManagementRemoteException;

/**
 * @author graj
 */
public class TestDeployment {
    /**
     * @param args
     */
    public static void main(String[] args) {
        String applicationArchive =
"C:/test/NetBeansProjects/SynchronousSample/SynchronousSampleApplication/dist/SynchronousSampleApplication.zip";
        String host = "licalhost", userName = "admin", password =
"adminadmin";
        int port = 8686; // default RMI Port
        String targetName = "server";
        String serviceAssemblyName = "";
        try {
            // Get a client connection
            ManagementClient client =
ManagementClientFactory.getInstance(host, port, userName, password);
            // Get the Deployment Service
            DeploymentService deploymentService =
client.getDeploymentService();
            // Deploy the Application
            serviceAssemblyName =
deploymentService.deployServiceAssembly(applicationArchive, targetName);
            // Get the Runtime Management Service
            RuntimeManagementService lifecycleService =
client.getRuntimeManagementService();
            // Start the application
            serviceAssemblyName =
lifecycleService.startServiceAssembly(serviceAssemblyName, targetName);
            // Stop the application
            serviceAssemblyName =
lifecycleService.stopServiceAssembly(serviceAssemblyName, targetName);
            // shutdown the application
            serviceAssemblyName =
lifecycleService.shutdownServiceAssembly(serviceAssemblyName, targetName);
            // undeploy the application
            serviceAssemblyName =
deploymentService.undeployServiceAssembly(serviceAssemblyName,
targetName);
        } catch (ManagementRemoteException e) {
            e.printStackTrace();
        }
    }
}


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@open-esb.dev.java.net
For additional commands, e-mail: dev-help@open-esb.dev.java.net

   
 
 
 


--



 
   
      Implement SOA today.
   
   
      Visit
The Open ESB Community (http://open-esb.org/)
     
   
   
      Visit Web Cornucopia
(http://blogs.sun.com/gopalan/)
     
   
   
     
     
      ? Grab this Headline Animator
     
   
 

















 

Re: bpel engine source code

by sherry_weng :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Roberto,

Think each create-jbi-application-configuration command would work for
one application configuration, i.e. you probably need a separate
properties for each create command.
Using your example, to add a new application configuration
"purchaseBpelConfig":
config.properties would look like:

configurationName=purchaserBpelConfig
httpUrlLocation=http://localhost:20000/purchaserServiceService/purchaserServicePort

admin command would be:
asadmin.bat create-jbi-application-configuration
--component=sun-http-binding --configname=purchaserBpelConfig config.properties

Nitika/Mark can correct me if I am wrong here.

Regards
--Sherry

rconfalonieri wrote:

> Hi Gopalan,
>
> thanks a lot for the pointers. They are indeed very interesting. Basically
> the possiblity to change the address of the service assembly would be very
> useful for me, as it will avoid to provide the package we'll create with all
> the library needed by recompilation.
> I have tried the approach, but I have some problems. This may come from the
> fact that the example of the application configuration you provided me, its
> rather simple as it considered the case only to change the endpoint of the
> BPEL.
> I have however many endpoint consumed/provided endpoint used and exposed by
> the BPEL as I am using wait and onMessage constructs inside the BPEL.
> Moreover I am consuming several Web services, whose real address its not
> known at design time, but only at deployment time. I have tried to create a
> config.properties file such this  (i'm attaching it) and excute a set of
> "asadmin.bat create-jbi-application-configuration.." one for each config,
> but is failed as I was expecting.
> The other problem I have been experiencing, is that the application
> configuration did not allow to specify me the customization for the BPEL
> port, that accepts only ${HttpDefaultPort} o ${HttpsDefaultPort}.
>
> Even if I finf the approach interesting, I was not able to fully understand
> how to apply it in a general way... :(
>
> Here below the config.properties file and the script for executing the
> asadmin.bat coomands.
>
> ----------
> # To change this template, choose Tools | Templates
> # and open the template in the editor.
>
> configurationName=purchaserBpelConfig
> httpUrlLocation=http://localhost:20000/purchaserServiceService/purchaserServicePort
>
> configurationName=supplierBpelConfig
> httpUrlLocation=http://localhost:20001/SupplierServiceService/SupplierServicePort
>
> configurationName=goodAcceptedConfig
> httpUrlLocation=http://localhost:20000/GoodStatusService/goodAcceptedPTBindingPort
>
> configurationName=workflowNotifierConfig
> httpUrlLocation=http://localhost:8080/PaymentAndRefundThirdPartyService/workflowNotifierService
>
> configurationName=goodRefusedConfig
> httpUrlLocation=http://localhost:20000/GoodStatusService/goodRefusedPTBindingPort
>
> configurationName=checkGoodConfig
> httpUrlLocation=http://localhost:8080/PurchaserWS/checkGoodsWSService
>
> configurationName=payConfig
> httpUrlLocation=http://localhost:8080/PaymentAndRefundThirdPartyService/payService
>
> configurationName=goodAvailableConfig
> httpUrlLocation=http://localhost:20000/GoodAvailableService/GoodAvailablePort
>
> configurationName=downloadConfig
> httpUrlLocation=http://localhost:8080/supplierWS/downloadService
>
> configurationName=refundStatusConfig
> httpUrlLocation=http://localhost:20000/RefundStatusService/RefundStatusPort
> ------------------------------------
> asadmin.bat create-jbi-application-configuration
> --component=sun-http-binding --configname=purchaserBpelConfig
> config.properties
> asadmin.bat create-jbi-application-configuration
> --component=sun-http-binding --configname=supplierBpelConfig
> config.properties
> asadmin.bat create-jbi-application-configuration
> --component=sun-http-binding --configname=goodAcceptedConfig
> config.properties
> asadmin.bat create-jbi-application-configuration
> --component=sun-http-binding --configname=workflowNotifierConfig
> config.properties
> asadmin.bat create-jbi-application-configuration
> --component=sun-http-binding --configname=goodRefusedConfig
> config.properties
> asadmin.bat create-jbi-application-configuration
> --component=sun-http-binding --configname=checkGoodConfig config.properties
> asadmin.bat create-jbi-application-configuration
> --component=sun-http-binding --configname=payConfig config.properties
> asadmin.bat create-jbi-application-configuration
> --component=sun-http-binding --configname=goodAvailableConfig
> config.properties
> asadmin.bat create-jbi-application-configuration
> --component=sun-http-binding --configname=downloadConfig config.properties
> asadmin.bat create-jbi-application-configuration
> --component=sun-http-binding --configname=refundStatusConfig
> config.p