Business Process Resolver

You can use the Business Process Resolver to run multiple business processes on a single JSP page or if you have complex conditional logic. The JSP compiler cannot compile the jsp when you use the runBP Tag Library.

Required Imports

<%@page import="org.w3c.dom.Document"%>
<%@page import="com.sterlingcommerce.woodstock.util.xml.XMLUtil"%>

Method Interfaces

public org.w3c.dom.Document resolve(String bpName, String processData, byte[]
	primaryDocument, String username) throws Exception
public org.w3c.dom.Document resolve(String bpName, String processData, byte[]
	primaryDocument, String username, boolean hasAttachment)throws Exception
public org.w3c.dom.Document resolve(String bpName, String processData,
	Document uploaded_doc,String username, boolean hasAttachment)throws Exception
public org.w3c.dom.Document resolve(String bpName, String processData, String
	primaryDocument, String username) throws Exception
public org.w3c.dom.Document resolve(String bpName, String processData, String
	primaryDocument, String username, boolean hasAttachment) throws Exception
public byte[] resolve(String bpName, String processData, String username) throws Exception

Example

<%
Document doc;
BusinessProcessResolver bpResolver = new BusinessProcessResolver();
doc = (org.w3c.dom.Document) bpResolver.resolve("myBPname","test=123&test2=234","","GIS_user_to_run_as");
strBPResultsData = XMLUtil.documentToString(doc, false);
%>

com.sterlingcommerce.woodstock.util.XMLUtil

This utility class is used in the previous code example. It provides several interfaces for managing xml nodes, which is what most of the BusinessProcessResolver class interfaces return, in the form of an org.w3c.dom.Document object.

Method Interfaces

public static String documentToHTML(Node node, boolean canonical)
public static String documentToString(Node node, boolean canonical)
public static String documentToString(Node node, boolean canonical, boolean useReturns)
public static String documentToString(Node node, boolean canonical, boolean useReturns)
public static String documentToString(Node node, boolean canonical, StringBuffer sb, String indent)
public static String documentToString(Node node, boolean canonical, StringBuffer sb, String indent, String newline)
public static String documentToString(Node node, boolean canonical, StringBuffer sb, String indent, String newline, boolean useReturns)