Project and Portfolio Management Practitioners Forum
cancel

web services in workflow step

Highlighted
PPMRam
Super Contributor.

web services in workflow step

Hi,

 

Can anyone executed PPM web serv ices from workflow execution step. If so, how can we achieve this. Basically I need to know if any web service ( createRequest or createProject or create staffing profile) with in the workflow step using step commands.

 

And there is no web services tool kit available for PPM 9.1 ( or for 8.0 ). where can I find.

 

Thanks

Shravan

8 REPLIES
Utkarsh_Mishra
Acclaimed Contributor.

Re: web services in workflow step

The web service toolkit can be found under:

 

<PPM_ROOT>\server\<Instance_name>\deploy\itg.war\download

 

One  way to call a web-service is to call the RUN_CLIENT.sh or RUN_CLIENT.bat from execution step and put below code in execution command. (here I am just giving the example.. change the script name)

 

ksc_connect_source_server
cd /opt/ITG/bin
sh kRunCacheManager.sh A
ksc_exit

 

OR

 

ksc_connect_source_server
cd ./bin
sh kRunCacheManager.sh 14
cd ./
sh kRunCacheManager.sh 34
cd ./
sh kRunCacheManager.sh A
ksc_exit

 

 

Cheers..
Utkarsh Mishra

-- Remember to give Kudos to answers! (click the KUDOS star)
PPMRam
Super Contributor.

Re: web services in workflow step

Hi,

 

Thanks for your response. I have called some of the web services from my local system using java program. But how can I use our ppm server to run the same program. Is there any settings ( path settings or jar file generation) that I need to do.

 

Thanks

Shravan

Utkarsh_Mishra
Acclaimed Contributor.

Re: web services in workflow step

You can put your JAVA client  under web service tool kit extract and can call it directly from RUN_CLIENT.sh.

 

You can refer these scripts (run_client and compile_client) content for more details.

 

 

Cheers..
Utkarsh Mishra

-- Remember to give Kudos to answers! (click the KUDOS star)
PPMRam
Super Contributor.

Re: web services in workflow step

Hi,

 

I am unable to compile and execute java client program in server. I am having problem setting path in server inorder to compile and execute the program.Could you please share any sample steps for this scenario.

 

Thanks

Shravan

Utkarsh_Mishra
Acclaimed Contributor.

Re: web services in workflow step

First of all Enable the web-services in server.conf

 

Then inorder to compile the Java class follow these steps:

 

Make sure the Web Service Toolkit is unzipped into a directory WITHOUT space in name.

 

1) Setup JAVA_HOME environment variable:

Right click on My ComputerPropertiesAdvancedEnvironment Variables, in System Variables panel, if JAVA_HOME variable is set, click on Edit button to change it to the directory where JDK is installed. Otherwise, click on New button to add it.

 

2) Setup PATH environment variable:

In the same panel, modify the PATH variable to add %JAVA_HOME%\bin; at the beginning.

 

3) Open a DOS prompt, type java –version, make sure that correct java x..x.x _xx version is printed out on the screen.

 

4) Change directory to where the PPM Web Service Toolkit is installed ($TOOLKIT_HOME), e.g. c:\ppm.ws, and cd to bin

 

5) Run compile_client.bat

 

6) Output should show up in the console indicating that compilation is successful. Press any key as it suggests.

 

 

If your server is in UNIX env then the settings must be check/done in .profile file of the system user.

Cheers..
Utkarsh Mishra

-- Remember to give Kudos to answers! (click the KUDOS star)
PPMRam
Super Contributor.

Re: web services in workflow step

Hi Utkarsh Mishra,

 

Thanks for your response.

 

Thanks

Shravan

PPMRam
Super Contributor.

Re: web services in workflow step

Hi Utkarsh Mishra,

 

I have tried to execute client program using my local system with following steps.

 

1). executed setEnv.bat

2). execute one of the sample program "DemandServiceClient" using below command.

 

java -Dclient.repository.dir=s:/java -classpath %CPATH% examples.dm.DemandServiceClient http://<url>:8080/itg/ppmservices/DemandService.

 

I am able to create requests. But how can we set CPATH and repository directory when i execute same in server ( either unix or wondows). Please help me.

 

Thanks

Shravan

Utkarsh_Mishra
Acclaimed Contributor.

Re: web services in workflow step

In server extract the web-service toolkit within PPM root.. and do not put any space in extracted directory. The classpath will be automatically set in server when you run setEnv.sh script.

 

Finally follow the steps in mentioned in above reply.

 

Note: Modify compile_client.sh script and un-comment/include this 

 

java -Dclient.repository.dir=$CURRPWD -classpath $CPATH examples.dm.DemandServiceClient http://localhost:8080/itg/ppmservices/DemandService

 

Finally call your web service from workflow step using the below statement i.e... using command execution step call run_Client.sh like...

 

ksc_connect_source_server SOURCE_ENV="KINTANA_SERVER"

cd <web_service_toolkit_extract>

run_client examples.dm.DemandServiceClient http://localhost:8080/itg/ppmservices/DemandService

ksc_exit

 

 

 

 

Cheers..
Utkarsh Mishra

-- Remember to give Kudos to answers! (click the KUDOS star)