Questions and discussion about developing processes and programming in PHP, JavaScript, web services & REST API.
Forum rules: Please search to see if a question has already asked before creating a new topic. Please don't post the same question in multiple forums.
#822471
Hi,
I'm developing an ASP.NET web application to use processmaker's features on it.
I wanna to show the inbox of each user in my own ASP.NET web application and when user clicks on each inbox item, open its dynaform and submit it.

Now, I've displayed the list of TODO cases in my own application, but i do not know how can i open the dynaform of the cases in my own application.

What's the solution?

Thank you.
#822480
To get the list of steps in a task, you can use:
Get Steps for Task: GET /project/{prj_uid}/activity/{act_uid}/steps

Then, to get the properties of the fields in a Dynaform, you can install my extraRest plugin and use:
Get Dynaform fields: GET extrarest/dynaform/{dyn_uid}

If you want to display the Dynaform inside an iframe, then you can use:
Get login session ID: GET extrarest/session-id
#822486
amosbatto wrote: Tue Jan 22, 2019 12:16 am To get the list of steps in a task, you can use:
Get Steps for Task: GET /project/{prj_uid}/activity/{act_uid}/steps

Then, to get the properties of the fields in a Dynaform, you can install my extraRest plugin and use:
Get Dynaform fields: GET extrarest/dynaform/{dyn_uid}

If you want to display the Dynaform inside an iframe, then you can use:
Get login session ID: GET extrarest/session-id
Thank you,
But i've got an error while uploading your plugin:
"Plugins
The file ExtraRest-1.9.tar doesn't contain class: ExtraRest"

What's the wrong ?
#822572
amosbatto wrote: Wed Jan 23, 2019 8:23 pm For some reason, MediaWiki seems to be screwing up .tar files. I uploaded it outside MediaWiki and have linked to that location in the documentation.
Try downloading it again:
https://www.pmusers.com/media/extraRest ... st-1.9.tar
Thanks, the error was fixed, but when i upload and import the plugin, nothing happens and the plugin list shows nothing.!!!
#822601
nevermore,
Let's do this the manual way. Decompress the .tar file. Then place the decompressed extraRest files in the following location on your ProcessMaker server:
workflow/engine/plugins/

Now you should have the following plugin registration file:
workflow/engine/plugins/extraRest.php
And the following plugin code file:
workflow/engine/plugins/extraRest/src/Services/Api/ExtraRest/Extra.php

Then, login as the "admin" user in ProcessMaker and go to Admin > Settings > Plugins > Plugin Manager and select the "extraRest" plugin in the list and click on the "Enable" button.

Now you should be able to call the extrarest endpoints.
#822609
Thanks,
When i click on PluginManager, the response is:

Notice: Only variables should be assigned by reference in C:\Bitnami\processmaker-3.3.0-2\apps\processmaker\htdocs\workflow\engine\plugins\extraRest.php on line 47
[{"id":1,"namespace":"extraRest","title":"extraRest Plugin\n(extraRest.php)","className":"extraRest","description":"Extra REST endpoints for ProcessMaker 3 by Amos Batto (amos@processmaker.com)","version":1.9,"setupPage":"","status_label":"Disabled","status":0,"setup":"0","sFile":"extraRest.php","sStatusFile":0}]
#822612
Oh, I bet you are are using PHP 7.1 if you are using Bitnami, which is very strict about things like passing a reference.

Edit your workflow/engine/plugins/extraRest.php file and change this line from:
Code: Select all
$oPluginRegistry = &PMPluginRegistry::getSingleton();
To:
Code: Select all
$oPluginRegistry = PMPluginRegistry::getSingleton();
Now it should work.
Also to prevent other problems like that, edit your Bitnami/processmaker-3.XX-X/php/php.ini file and change the line from:
Code: Select all
error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT
To:
Code: Select all
error_reporting = E_ALL & ~E_NOTICE & ~E_DEPRECATED & ~E_STRICT
Then, restart the Apache server or reboot.
#822750
nevermore wrote:Hello
I have a problem with the API:
When i call the 'http://localhost/api/1.0/workflow/extrarest/session-id' to get the SessionId, the response is:
'{"error":{"code":401,"message":"Unauthorized"}}'

What's wrong ?!
In addition, i'm logged in to ProcessMaker by GetToken.
You are probably not including the access token correctly in the header.
Post your code or post screenshots if using Postman or HttpRequestor in your web browser.
#823492
The session ID expires after 24 minutes of inactivity.

If you are programming an external application, you will need to login again in REST and then call the extrarest/session-id endpoint again to get another session ID.

PS: You can increase the amount of time before it expires by going to Admin > Settings > System in ProcessMaker and increasing the size of Cookie Lifetime (Seconds).
#823500
Hello,
Thank you.
But i think this is not the main problem, because when i get token by '/workflow/oauth2/token' API and after that get session-id, i call other APIs immediately.

In addition when i call
'http://localhost:81/sysworkflow/en/neoc ... ction=sent' , it works fine,
but if i call
'http://localhost:81/sysworkflow/en/neoc ... ction=sent',
it responds the same error.
#827537
I have same problem in
http://{domain_or_ip}/sys{workspace}/{lang}/{skin}/cases/cases_Step?TYPE=DYNAFORM&UID={dynaform_uid}&POSITION={position}&ACTION=EDIT&sid={session_id}
Reference from here: https://www.pmusers.com/index.php/ExtraRest_plugin#Get_login_session_ID:_GET_extrarest.2Fsession-id
I get access_token, then get extrarest/session-id, but whene send it to cases_Step with ...&sid={session_id} I get this:
{"error":"You have lost your session and you have to login again.","success":true,"lostSession":true}
#829515
Hi sir,

i I've succeeded load dynaform with session id, but when i tried to load the dynaform via iframe it couldn't,
https://myprocessmaker.co.id/sysworkflow/en/neoclassic/cases/cases_Open?APP_UID=44173914061444588379642010628945&DEL_INDEX=2&sid=238819494614728b6397751021883150

the error Refused to display 'https://myprocessmaker.co.id/' in a frame because it set 'X-Frame-Options' to 'sameorigin'.

thx

A 1xbet clone script is a pre-designed software so[…]

4rabet clone script is enabling entrepreneurs to e[…]

Parimatch clone script is enabling entrepreneurs t[…]

In the world of cryptocurrency, a wallet is an app[…]