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.
#814641
Yes we can create a client app and develop an interface and send data using the rest endpoints of the processmaker. Is there a use case for creating a angular5 or other languages out there, to map fields of dynaforms? I mean creating new interfaces for dynaforms? is that possible or is there a use case.?

Let's say I have a web Entry for passport renewal (Dynaform), and we have a website developed in Java/Spring, Angular5, can we map the fields of web entry dynaform to our website?

Best regards
jemistorm
#814652
There are two ways to do this. One way is to create a custom web page in your web site with a form containing your fields. When the form is submitted, you can either use the newCase() web service or the POST /cases REST endpoint to start the new case in processmaker.

The other way to handle this situation is to add an <iframe> to your web site whose scr is the URL of the web entry. Then edit the Web Entry's XXXXXXXXXXXXXXXXXXXXXXXPost.php file to send the submitted data from the Web Entry to your web site. I've never used Java/Spring and Angular5, but presumably you either have some kind of REST API or you can write the data to the site's database.
See: https://sourceforge.net/p/pmcommunity/c ... omization/

Here is an example of writing the data to your site's database. Let's say that your web Entry has the variables "clientName" and "clientAddress" and the ID of the Database Connection to your web site's database is 123456789abcdef1234567890abcdef and that database has a table named CLIENTS. Then you can replace this code in XXXXXXXXXXXXXXXXXXXXXXXXXPost.php:
Code: Select all
        $result = ws_routeCase($caseId, 1);
        $assign = $result->message;

        $aMessage["MESSAGE"] = "<br />Case Number: $caseNr <br />Case Id: $caseId<br />Case derivated to: $assign"; 
with:
Code: Select all
        $result = ws_routeCase($caseId, 1);
        $assign = $result->message;

        $clientName = addslashes($pmdynaform['clientName']); 
        $clientAddress = addslashes($pmdynaform['clientAddress']);
        $contractAmount = (float) $pmdynaform['contractAmount']; //convert from string to floating point number

        G::LoadClass("pmFunctions");
        $db = '123456789abcdef1234567890abcdef';
        $sql = "INSERT INTO CLIENTS (CLIENT_NAME, CLIENT_ADDRESS, CONTRACT_AMOUNT) ".
             "VALUES ('$clientName', '$clientAddress', contractAmount)";
        $sqlResult = executeQuery($sql, $db);

        $aMessage["MESSAGE"] = "<br />Case Number: $caseNr <br />Case Id: $caseId<br />Case derivated to: $assign";

Do you want a quick way to delete passwords from P[…]

Try the CloudMigration PST Converter to convert […]

In the rapidly evolving world of online sports be[…]

STEPN integrates social networking and games that […]