Entering HTML Code Manually

  1. Select Manual from the Form Type drop-down list.
  2. Click Create Form to open the design form.

    Type the HTML code in the HTML Code text box to design the form. Sample HTML code to design the form is: 

<TABLE
height="90%" cellSpacing=0 cellPadding=0 width="100%" border=0>
 <TBODY>
  <TR height="15%">
    <TD colSpan=3>
      <H1 align=center><FONT face="Times New Roman" color=brown size=8>Adeptia BPM Server</FONT></H1></TD></TR>
  <TR height="70%">
    <TD width="15%">
         </TD>
    <TD width="70%">
      <TABLE height="100%" width="100%" border=0>
        <TBODY>
        <TR height=10>
          <TD>
            <H1 align=center><FONT face="Times New Roman" color=brown size=6>Employee Management Form
</FONT></H1></TD></TR>
        <TR height=80>
          <TD>
            <FORM name=HTMLForm>
            <TABLE>
              <TBODY>
              <TR>
                <TD>Employee Id</TD>
                <TD><BR><INPUT name=Employeeid type=text></TD></TR>
              <TR>
                <TD>Employee Address</TD>
                <TD><BR><INPUT name=Employeeaddress type=text></TD></TR>
              <TR>
                <TD>Employee Work Experience</TD>
                <TD><BR><SELECT name=Workexperience><OPTION value=1             
selected>One</OPTION><OPTION value=2>Two</OPTION><OPTION                  
value=3>Three</OPTION><OPTION  
value=4>Four</OPTION></SELECT></TD></TR>
              <TR>
                <TD>Are these details are fine?</TD>
                <TD><BR><INPUT type=radio value=Yes               
name=Checkdetails>Yes<INPUT type=radio value=No            
name=Checkdetails>No</TD></TR>
              <TR>
                <TD colSpan=2><INPUT type=submit value="Save Task" name=partialSubmit>
<INPUT type=submit value="Complete Task" name=fullSubmit></TD></TR></TBODY></TABLE></FORM></TD></TR>
        <TR height=10>
          <TD>
            <H1 align=center><FONT face="Times New Roman" color=brown size=4>Press Save Task button to save this form </FONT>
            <H1 align=center><FONT face="Times New Roman" color=brown size=4>Press Complete Task button to complete this form       
</FONT>

While creating a form,

  • You must specify the HTML Form name.
  • You must design only one Complete Task button. There should not be any other action, that is, Cancel or Back.
  • You must design a Save Task button, which is used to save the completed task.
  • You must specify fullsubmit and partialsubmit variables for Complete Task and Save Task buttons.
  • There could be any number of radio buttons.
  • Variables defined in the HTML Code are automatically created in the Process Flow.

Once you have entered the HTML code, click Submit. 

While writing the HTML code, at times, some business scenarios cannot be addressed by simple HTML code. To implement these scenarios, you need more dynamic behavior of Human Workflow web pages and interaction with the server to get the required information. Adeptia Suite allows you to integrate the custom web application that you have created using JSP or AJAX.

Integrating a Custom Web Application in Human WorkFlow

To integrate the custom web application, take care of the following points:

  • While writing HTML code for a Workflow activity, you need to define a hidden variable named PID using the following code:
      <input Type=hidden name=PID readOnly>

           This variable is used to pass the Process Flow ID (unique value generated for each execution of Process Flow) to the custom web application, which you have created.

  • Create a hyperlink to call your custom web application and the corresponding JavaScript. The below sample code creates a "Review" link in the Workflow page. Clicking the "Review" link calls the "review" function.
     
<a href='javascript:review();'>
<font color=blue>Review</font></a>
<scripPractice Form 1Practice Form
1Practice Form 1Practice Form 1Practice Form 1Practice Form 1Practice Form
1Practice Form 1Practice Form 1>
function review()
{
var pid=document.HTMLForm.PID.value;
var
vWinTrans=window.open("custom/Review.jsp?PID="+pid
,"_blank","toolbar=yes,location=no,directories=no,status=no,menubar=yes,scrollbars=yes,resizable=yes,copyhistory=no");
}
</script>

 

In the above-mentioned code, Review.jsp is the custom jsp, which is called when you click the "Review" link in the Workflow page.

  • In the custom web application, add the following code to access the value of Process Flow ID.
           string pid=request.getParameter("PID");
  • To create an instance of class transaction information, add the following code.
           TransactionInformation ti=new TransactionInformation(request,session);
  • A custom web application allows you to perform any kind of operation that is required. In addition, you can use Adeptia API to perform operations like logging information in a Process Flow log, viewing variables, service objects, etc. 
  • Create a subfolder "custom" in <InstallFolder>/ServerKernel/web and copy your custom JSP in the "custom" folder.