Blog Viewer

Exploit CA PPM XBLs and PMDs

By marku02 posted Apr 02, 2018 07:54 AM




Running / Scheduling a Job in CA PPM through Gel Script is possible with very simple code. Here you go.


<gel:script xmlns:core="jelly:core" xmlns:gel="jelly:com.niku.union.gel.GELTagLibrary"  >
    <gel:parse var="inputDoc">
            <job job_name="Delete Process Instance" job_definition_id="50420"
                job_definition_type="JOB" recurrence_type="4" whenNow="1" whenRecur="1" >
    <core:catch var="excp">
        <core:new className="com.niku.odf.object.xbl.XBLExecutor" var="xblInstance">
            <core:arg value="scheduler/postSchedulerProperties.xbl"/>
            <core:arg value="nmc"/>
            <core:arg value="${inputDoc}"/>
        <core:invoke method="executeXBL" on="${xblInstance}" var="responseDoc"/>
    <gel:log>Response Doc : <gel:expr select="$responseDoc"/> </gel:log>
    <gel:log>Exception: ${excp} </gel:log>



The above code is just for demonstration purpose and it immediately schedules "Delete Process Instance" job to run immediately. There are additional attributes as well as sub elements of "data" element through which we can either schedule any job just the way we do it through UI.

Note: Many hacks into ca ppm are possible with XBLs