Question
Instellars
SG
Last activity: 4 Feb 2019 7:53 EST
How to call an activity in HTML fragment rule ?
How to call an activity in HTML fragment rule by using HTML tag ?
***Updated by moderator: Lochan to update platform capability***
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Areteans
AU
Hi Srikanth,
In HTML, you can execute an activity using script tags with oSafeURL as given below:
<script type=text/javascript>
var oSafeURL = new SafeURL();
oSafeURL.put("pyActivity","Assign-Worklist.ProcessAssignment");
oSafeURL.put("ClassName", "Assign-Worklist");
oSafeURL.put("InsHandle",param);
return oSafeURL;---this will return only true or false based on execution
</script>
Hope this helps you.
Thanks,
Divya Sri Padarthy
OCBC Bank
MY
Hi Divya,
How can i pass parameters from HTML fragment while call the activity. For example, i have used two input fields in a form and i want to pass the values to the calling activity. The activity accept 2 parameters. How should i pass through the HTML fragment.
Note: I want to call the activity on a button click in the HTML Fragment(Please refer the code below). Please find a sample code where i want to apply
<!DOCTYPE html>
<html>
<body>
<h2>Grouping Form Data with Fieldset</h2>
<form>
<fieldset>
<legend>Personal information:</legend>
First name:<br>
<input type="text" class="inputBox" name="firstname" value="Mickey">
<br>
Last name:<br>
<input type="text" class="inputBox" name="lastname" value="Mouse">
<br><br>
<input type="submit" value="Submit" onClick="createUser()">
</fieldset>
</form>
</body>
</html>
Thank you
Riyaz
Vodafone
IN
Hello Srikanth,
You can use the javascript code recommended by Divya sri above in OOTB HTML fragment - Userworkform inside a function which can be reusable or easy to call the javascript function where ever you need.
-
Ravi Kumar Pisupati
CollabPartnerz
IN
Below link might help you.
CollabPartnerz
IN
Hi,
Below post is similar to your post.
https://collaborate.pega.com/discussion/calling-activity-html-section
TN
RU
Hello. This fragment can help you.
<%
HashStringMap params = new HashStringMap();
params.putString("pxObjClass", "Rule-Obj-Activity");
params.putString("pyClassName", "ActivityClass");
params.putString("pyActivityName", "ActivityName");
tools.putParamValue("ParamName","ParamValue");
tools.doActivity(params, tools.getPrimaryPage(), tools.getParameterPage());
%>