You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@airavata.apache.org by Saminda Wijeratne <sa...@gmail.com> on 2012/11/20 22:14:46 UTC
Using the Airavata API
Hi Devs,
Here's a simple introduction to using the Airavata API. It is used in order
to work with the Airavata system. It allows,
- Authoring workflows (workflow composition is not supported) &
Computational resources
- Running & monitoring experiments,
- Authoring provenance data of experiments
To create an Airavata API,
AiravataClientUtils.getAPI(<RegistryServiceURI>, <Username>, <Password>);
eg:
airavataAPI = AiravataClientUtils.getAPI(new URI("
http://localhost:8080/axis2/services/registry"), "admin", "admin-pass");
Once an Airavata API object, use the following managers to work with all
aspects of Airavata
airavataAPI.getAiravataManager()
airavataAPI.getWorkflowManager()
airavataAPI.getApplicationManager()
airavataAPI.getExecutionManager()
airavataAPI.getProvenanceManager()
airavataAPI.getUserManager()
Regards,
Saminda
Re: Using the Airavata API
Posted by Saminda Wijeratne <sa...@gmail.com>.
Does the backend have the relevant URLs updated? Also we need to have a
thorough testing of the changes we are doing for the layers between the
backend & frontend.... Let me run some tests on this first...
Saminda.
On Mon, Nov 26, 2012 at 1:40 PM, Raminderjeet Singh <
raminderjsingh@gmail.com> wrote:
> startMonitoring
Re: Using the Airavata API
Posted by Saminda Wijeratne <sa...@gmail.com>.
Does the backend have the relevant URLs updated? Also we need to have a
thorough testing of the changes we are doing for the layers between the
backend & frontend.... Let me run some tests on this first...
Saminda.
On Mon, Nov 26, 2012 at 1:40 PM, Raminderjeet Singh <
raminderjsingh@gmail.com> wrote:
> startMonitoring
Re: Using the Airavata API
Posted by Raminderjeet Singh <ra...@gmail.com>.
Hi Saminda
I am writing a monitoring client to get notifications for all the workflow running. I have written following code to get notification but i am getting null pointer as service is not able to find Broker URL. Suggestions?
AiravataAPI airavataAPI = AiravataAPIFactory.getAPI(new URI("http://localhost:9080/airavata-services/"), "odi", "root", new PasswordCallBackImpl("<user>", "<pass>") );
Monitor experimentMonitor = airavataAPI.getExecutionManager().getExperimentMonitor(">", new MonitorEventListenerImpl());
experimentMonitor.startMonitoring();
java.lang.NullPointerException
at java.net.URI$Parser.parse(URI.java:3004)
at java.net.URI.<init>(URI.java:577)
at org.apache.airavata.client.AiravataClient.getWorkflowExecutionMonitor(AiravataClient.java:376)
at org.apache.airavata.client.impl.ExecutionManagerImpl.getExperimentMonitor(ExecutionManagerImpl.java:88)
at org.apache.airavata.odi.notification.NotificationListener.main(NotificationListener.java:21)
Thanks
Raminder
On Nov 20, 2012, at 4:14 PM, Saminda Wijeratne wrote:
> Hi Devs,
>
> Here's a simple introduction to using the Airavata API. It is used in order
> to work with the Airavata system. It allows,
>
> - Authoring workflows (workflow composition is not supported) &
> Computational resources
> - Running & monitoring experiments,
> - Authoring provenance data of experiments
>
>
> To create an Airavata API,
>
> AiravataClientUtils.getAPI(<RegistryServiceURI>, <Username>, <Password>);
>
> eg:
> airavataAPI = AiravataClientUtils.getAPI(new URI("
> http://localhost:8080/axis2/services/registry"), "admin", "admin-pass");
>
>
> Once an Airavata API object, use the following managers to work with all
> aspects of Airavata
>
> airavataAPI.getAiravataManager()
> airavataAPI.getWorkflowManager()
> airavataAPI.getApplicationManager()
> airavataAPI.getExecutionManager()
> airavataAPI.getProvenanceManager()
> airavataAPI.getUserManager()
>
> Regards,
> Saminda
Re: Using the Airavata API
Posted by Chathuri Wimalasena <ka...@gmail.com>.
If you are using REST service instead of Airavata Registry, you will need
to call the following method.
airavataAPI = AiravataClientUtils.getAPI(<REST service
URI>, getRegistryUserName(), passwordCallback);
passwordCallback class is the implementation of a Callback interface which
will be used to retrieve the password for the current user.
Regards,
Chathuri
On Tue, Nov 20, 2012 at 4:14 PM, Saminda Wijeratne <sa...@gmail.com>wrote:
> Hi Devs,
>
> Here's a simple introduction to using the Airavata API. It is used in order
> to work with the Airavata system. It allows,
>
> - Authoring workflows (workflow composition is not supported) &
> Computational resources
> - Running & monitoring experiments,
> - Authoring provenance data of experiments
>
>
> To create an Airavata API,
>
> AiravataClientUtils.getAPI(<RegistryServiceURI>, <Username>, <Password>);
>
> eg:
> airavataAPI = AiravataClientUtils.getAPI(new URI("
> http://localhost:8080/axis2/services/registry"), "admin", "admin-pass");
>
>
> Once an Airavata API object, use the following managers to work with all
> aspects of Airavata
>
> airavataAPI.getAiravataManager()
> airavataAPI.getWorkflowManager()
> airavataAPI.getApplicationManager()
> airavataAPI.getExecutionManager()
> airavataAPI.getProvenanceManager()
> airavataAPI.getUserManager()
>
> Regards,
> Saminda
>
Re: Using the Airavata API
Posted by Chathuri Wimalasena <ka...@gmail.com>.
If you are using REST service instead of Airavata Registry, you will need
to call the following method.
airavataAPI = AiravataClientUtils.getAPI(<REST service
URI>, getRegistryUserName(), passwordCallback);
passwordCallback class is the implementation of a Callback interface which
will be used to retrieve the password for the current user.
Regards,
Chathuri
On Tue, Nov 20, 2012 at 4:14 PM, Saminda Wijeratne <sa...@gmail.com>wrote:
> Hi Devs,
>
> Here's a simple introduction to using the Airavata API. It is used in order
> to work with the Airavata system. It allows,
>
> - Authoring workflows (workflow composition is not supported) &
> Computational resources
> - Running & monitoring experiments,
> - Authoring provenance data of experiments
>
>
> To create an Airavata API,
>
> AiravataClientUtils.getAPI(<RegistryServiceURI>, <Username>, <Password>);
>
> eg:
> airavataAPI = AiravataClientUtils.getAPI(new URI("
> http://localhost:8080/axis2/services/registry"), "admin", "admin-pass");
>
>
> Once an Airavata API object, use the following managers to work with all
> aspects of Airavata
>
> airavataAPI.getAiravataManager()
> airavataAPI.getWorkflowManager()
> airavataAPI.getApplicationManager()
> airavataAPI.getExecutionManager()
> airavataAPI.getProvenanceManager()
> airavataAPI.getUserManager()
>
> Regards,
> Saminda
>
Re: Using the Airavata API
Posted by Raminderjeet Singh <ra...@gmail.com>.
Hi Saminda
I am writing a monitoring client to get notifications for all the workflow running. I have written following code to get notification but i am getting null pointer as service is not able to find Broker URL. Suggestions?
AiravataAPI airavataAPI = AiravataAPIFactory.getAPI(new URI("http://localhost:9080/airavata-services/"), "odi", "root", new PasswordCallBackImpl("<user>", "<pass>") );
Monitor experimentMonitor = airavataAPI.getExecutionManager().getExperimentMonitor(">", new MonitorEventListenerImpl());
experimentMonitor.startMonitoring();
java.lang.NullPointerException
at java.net.URI$Parser.parse(URI.java:3004)
at java.net.URI.<init>(URI.java:577)
at org.apache.airavata.client.AiravataClient.getWorkflowExecutionMonitor(AiravataClient.java:376)
at org.apache.airavata.client.impl.ExecutionManagerImpl.getExperimentMonitor(ExecutionManagerImpl.java:88)
at org.apache.airavata.odi.notification.NotificationListener.main(NotificationListener.java:21)
Thanks
Raminder
On Nov 20, 2012, at 4:14 PM, Saminda Wijeratne wrote:
> Hi Devs,
>
> Here's a simple introduction to using the Airavata API. It is used in order
> to work with the Airavata system. It allows,
>
> - Authoring workflows (workflow composition is not supported) &
> Computational resources
> - Running & monitoring experiments,
> - Authoring provenance data of experiments
>
>
> To create an Airavata API,
>
> AiravataClientUtils.getAPI(<RegistryServiceURI>, <Username>, <Password>);
>
> eg:
> airavataAPI = AiravataClientUtils.getAPI(new URI("
> http://localhost:8080/axis2/services/registry"), "admin", "admin-pass");
>
>
> Once an Airavata API object, use the following managers to work with all
> aspects of Airavata
>
> airavataAPI.getAiravataManager()
> airavataAPI.getWorkflowManager()
> airavataAPI.getApplicationManager()
> airavataAPI.getExecutionManager()
> airavataAPI.getProvenanceManager()
> airavataAPI.getUserManager()
>
> Regards,
> Saminda