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.
User avatar
By amosbatto
#825856
There is no easy way to do it with the current REST endpoints. You can use REST to import a process file or create tasks, but there aren't REST endpoint to create the other elements and connect them in a process.

Do you have a special requirement?
User avatar
By amosbatto
#825857
If you install my extraRest plugin, then you can use GET http://{domain-or-ip}/api/1.0/{workspace}/extrarest/session-id to obtain the session ID and append it to the following URL to open the process designer in an external page:
http://{domain-or-ip}/sys{workspace}/en/neoclassic/designer?prj_uid={process-id}&sid={session-id}

If you want to embed the Process Designer in an external web page, then you can use an <iframe> to open the above URL.

This PHP code worked for me to redirect to the Process Designer for editing a process:
Code: Select all
function redirectToDesigner($oToken) {
	global $pmServer, $pmWorkspace;
	$processId = '3488462315d48989d598bc8012454964';
	
	$url = "$pmServer/api/1.0/$pmWorkspace/extrarest/session-id";
	$oRet = pmRestRequest('GET', $url, null, $oToken->access_token);
	
	if ($oRet->status==200) {
		$redirectUrl = "http://localhost:3310/sysworkflow/en/neoclassic/designer?prj_uid=$processId&sid=" .
			$oRet->response;
		header("location: $redirectUrl");
	}
}
Want to create your own meme coin?

In the world of cryptocurrencies, a unique and exc[…]

The market for cryptocurrencies is demonstrating a[…]

What's SAP FICO?

Embarking on a dissertation can be one of the most[…]

Hello. For rental housing, there are software solu[…]