Topic
  • 5 replies
  • Latest Post - ‏2013-05-21T06:56:41Z by Live_Wire
Live_Wire
Live_Wire
20 Posts

Pinned topic How to create new Action record (Type - Application Action)?

‏2013-05-17T12:58:48Z |

Hi,

 

I am trying to create an Escalation for PR application, which can trigger an action to 'create PO' for selected PR records.

The action which I am planning associate with the above Escalation is an new action (Application Action Type), but in the value field of the 'Action' record, we have only predefined set of actions(11 for Maximo 7.1 and 17 for Maximo 7.5).

Is there any way I can associate the select action 'Create PO' in the value list of action record.

note: I want to use 'Create PO' action which is already available in PR application OOB.

Thanks in advance.

 

  • scottsd
    scottsd
    121 Posts

    Re: How to create new Action record (Type - Application Action)?

    ‏2013-05-17T15:14:28Z  

    No these predefined Application Actions are defined in our framework in metadata and implemented through code in our framework and requires some extension of our OOTB Java action classes to extend, which is relatively complicated.  I'd recommend writing an Automation Script action in 7.5 to create the PO from the PR. It should be simpler and easier to trigger from your workflow.

    This Jython script will probably use the underlying/existing Java interface to create the PO from the existing PR, but you won't have to worry about extending the "Application Action" metadata and java object.

    I'm actually playing around in this space today, if I get anything going I'll post the script here.

    Scott.

  • scottsd
    scottsd
    121 Posts

    Re: How to create new Action record (Type - Application Action)?

    ‏2013-05-17T22:34:17Z  
    • scottsd
    • ‏2013-05-17T15:14:28Z

    No these predefined Application Actions are defined in our framework in metadata and implemented through code in our framework and requires some extension of our OOTB Java action classes to extend, which is relatively complicated.  I'd recommend writing an Automation Script action in 7.5 to create the PO from the PR. It should be simpler and easier to trigger from your workflow.

    This Jython script will probably use the underlying/existing Java interface to create the PO from the existing PR, but you won't have to worry about extending the "Application Action" metadata and java object.

    I'm actually playing around in this space today, if I get anything going I'll post the script here.

    Scott.

    Create an automation script that runs against the PR object (possibly that you plug into a workflow against the PR object)

    Here's the automation script contents that will create a PO from a PR.

    from java.util import Date
    from java.lang.System import out
            
    out.println("description: " + mbo.getString("DESCRIPTION"));
            
    mbo.createPOsFromPR(Date());  

     

     

     

  • Live_Wire
    Live_Wire
    20 Posts

    Re: How to create new Action record (Type - Application Action)?

    ‏2013-05-20T06:30:32Z  
    • scottsd
    • ‏2013-05-17T22:34:17Z

    Create an automation script that runs against the PR object (possibly that you plug into a workflow against the PR object)

    Here's the automation script contents that will create a PO from a PR.

    from java.util import Date
    from java.lang.System import out
            
    out.println("description: " + mbo.getString("DESCRIPTION"));
            
    mbo.createPOsFromPR(Date());  

     

     

     

    Hi Scott,

    Thank you very much for your valuable input.

    Here I am using Maximo 7.1.1.6, so I don't have option for Automation script.

     

    Thanks

    Mohan

  • scottsd
    scottsd
    121 Posts

    Re: How to create new Action record (Type - Application Action)?

    ‏2013-05-20T14:34:40Z  

    You'll have to write a custom java Action, but the java method that you will call (createPOsFromPR(Date()) will be the same.  Take a look at Bruno's great article here..

    http://maximodev.blogspot.com/2012/06/sample-action-class-java-maximo.html

  • Live_Wire
    Live_Wire
    20 Posts

    Re: How to create new Action record (Type - Application Action)?

    ‏2013-05-21T06:56:41Z  
    • scottsd
    • ‏2013-05-20T14:34:40Z

    You'll have to write a custom java Action, but the java method that you will call (createPOsFromPR(Date()) will be the same.  Take a look at Bruno's great article here..

    http://maximodev.blogspot.com/2012/06/sample-action-class-java-maximo.html

    Thank you very much Scott.

    It helps me a lot.

     

    Mohan