Questions and discussion about using ProcessMaker 2: user interface, running cases and functionality
Forum rules: Please search to see if a question has already been asked before posting. Please don't ask the same question in multiple forums.
By willturner
#11835
Hi All ,

I need to use web services in java. I am successfully able to log in from java application.
But i have some queries.
Requirement :
A ProcessMaker user logs in.He gets the list of cases which he can start (like clicking new case from ProcessMaker).
User selects case and start case.

Solution:

user logs in using===> loginResponse login(string userid, string password)
I get a session id.

to start new case ===> newCase(string sessionId, string processId, string taskId, array variables)
I have session id.I can get task id by using taskList(string sessionId).
But when i use processList(string sessionId) to get process id.It shows message that u dont have permission to access process list as user has PROCESSMAKER_OPERATOR level.

I can do it by accessing wf_workspace_name.pocess . But how can i get process list using web service?

Thanks and Regards :D
User avatar
By amosbatto
#11840
Only a user with the PM_FACTORY permission in his role (like the "admin" user) is able to call the processList() function, which is a problem if you are trying to use the newCase() web service and need to know the process UID. I just filed a bug report about this. See: http://bugs.processmaker.com/view.php?id=6613

For now, you will have to program your web services with the process UID in the code (rather than using processList() to discover it), or create new cases with a user who does have the PM_FACTORY permission in his role and then use the newCaseImpersonate() function to start new cases and then call the reassignCase() web service to give it to the right user.
By willturner
#11859
Hi Amos ,
Thank you very much for your quick replay :D !
I will implement your solution and i will update it here.

But i have one more query.
In ProcessMaker we can test web service from Admin==>Web Service Test.After log in we can access web service functions from there.

I log in as a user who has PROCESSMAKER_OPERATOR level in Web Service Test .
Then I select new case() .After that I do not get proper process ID and Task ID in drop down menu and I am unable to start new case [status code 11].

But
When i do it in following order it works.
1.Log in as admin PROCESSMAKER_ADMIN in web service test.
2.select processList() and get process list.
3.Log out and login as user PROCESSMAKER_OPERATOR .
4.select newCase() and we get proper process ID and Task ID in drop down menu .Then it is possible to successfully create new case from ProcessMaker UI.
How does it work?

muchas gracias :D

Thanks and Regards
By willturner
#11861
Hi
Few more queries:

1.Using taskList() shows task assigned to logged in user.
But it does not provide information about which is the starting task.For creating new case we need starting task.

2.Using processList() shows you list of processes if you have valid permission .But there is no way to find out ,the task we want to start belongs to which process using web services.For creating new case we need starting task and process id of the process to which the task belongs.

Thank You
User avatar
By amosbatto
#11910
Generally people don't use web services to discover the IDs and structure of their processes. They just look up the IDs in ProcessMaker or in the database and hard-code these values in their code, since they don't generally change. However, these are all valid problems. Can you please file a bug reports about them at http://bugs.processmaker.com
By maniecaes
#12059
I want to try this web access service from admin. Anyway, this is my fist time to try this one so I want to learn more before trying to not end up messing it. It would be just fine to try it from the start.
By jesusRiva
#15919
:shock: I need help whit get session id whit web services in java.

I see documentation but is not equal than code, the method login in my soap client is a void method and it get userid, password, statusCode, message, version, timestamp. in documentation it received userid and password and return LoginRespose so I can't get session , someone to help me please :cry: I don't know to do.
By jesusRiva
#15920
Web Services in Java

I can't get session id because documentation have a login void method and I need to return login response with session id.

so this is my code:
Code: Select all
com.processmaker.ProcessMakerService service = new com.processmaker.ProcessMakerService();
com.processmaker.ProcessMakerServiceSoap port = service.getProcessMakerServiceSoap();
                
java.lang.String userid = "****";//this is my user id 
java.lang.String password = "****"; // this is my password 
javax.xml.ws.Holder<java.math.BigInteger> statusCode = null; //the method login required set status code but I need to it return this 
javax.xml.ws.Holder<java.lang.String> message = null; //the method login required message code but I need to it return this 
javax.xml.ws.Holder<java.lang.String> version = null; //the method login required version code but I need to it return this 
javax.xml.ws.Holder<java.lang.String> timestamp = null; //the method login required timestamp code but I need to it return this 

port.login(userid, password, statusCode, message, version, timestamp);
So someone to help me with this?

only I need the session id of process maker.

Get an instant solution to move emails to MBOX for[…]

Most Demanding OST to PST Converter

The most demanding OST to PST Converter is TrijaT[…]

Betvisa clone scripts are pre-built software solut[…]

A Bet365 Clone Script is essentially a ready-made […]