IBM Support

JSP Page to dump the execution context of a Business Process Diagram

Troubleshooting


Problem

This JSP page lists the execution context of a BPD in xml format.

Resolving The Problem

How do I view the execution context of a BPD?


Cut the text below to create a JSP called bpdcontext.jsp. Place the file in the location listed here:

App ServerLocation
jBoss process-server/applications/teamworks.ear/teamworks.war/html
Bea process-server/applications/teamworks.ear/teamworks/html
Bea 9.2 process-server/servers/twprocsvr/stage/teamworks/teamworks.ear/teamworks/html
WebSphere installedApps/yourCell/teamworks.ear/teamworks.war/html

When you run the JSP, enter the BPDbpd instance id to get the execution context and execution tree of that bpd instance.


-----cut here------
<%@page import="java.sql.*, java.io.*, javax.sql.DataSource, javax.naming.*"%>

<%!
    String dsName = "jdbc/TeamWorksDB";
%>
<%
    String req =  request.getParameter ("dsName");
    if (req != null) {
        dsName = req;
    }
%>
<form method="post" action="<%=request.getRequestURI()%>">
    Enter Datasource Name:<input type="text" value="<%=dsName%>" name="dsName"/><br>
    <input type="submit" value="submit"/>
</form>

<%
try {
    String driver = "";
    String db = "";

   
    if (!dsName.equals("")) {
        InitialContext ctx = new InitialContext();
        DataSource dataSource = (DataSource) ctx.lookup (dsName);
        Connection con = dataSource.getConnection();
        DatabaseMetaData dmd = con.getMetaData();
        db = dmd.getDatabaseProductName() + " " + dmd.getDatabaseProductVersion();
        driver = dmd.getDriverName() + " "  + dmd.getDriverVersion();

    %>
    Success! We looked up and got a connection to <%=dsName%><br>
    Database: <%=db%> <br>
    Driver version: <%=driver%><br>
    <%
    }
}
catch (Exception e) {
    PrintWriter pw = new PrintWriter (out);
    %>
    There was an exeption getting a connection to or looking up the datasource:<%=dsName%><br>
    <pre>
        <%
        e.printStackTrace (pw);
        %>
    </pre>
    <%
 
}
%>

-----cut here------

[{"Product":{"code":"SSFPRP","label":"WebSphere Lombardi Edition"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"Business Process Definition (BPD)","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF010","label":"HP-UX"},{"code":"PF016","label":"Linux"},{"code":"PF027","label":"Solaris"},{"code":"PF033","label":"Windows"}],"Version":"6.2.2;6.2.1;6.2;6.1;6.0.1","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}}]

Historical Number

327

Document Information

Modified date:
15 June 2018

UID

swg21439765