Matt Paulhus's Profile
Agile Angel
1049
Points

Questions
25

Answers
144

  • Agile Angel Asked on December 4, 2018 in Other APIs.

    How many business objects are you talking about?  Agile’s import utility is quite fast. It’ll create the object update the object if the field is mapped correctly and there’s an update to be made.  I feel as though that without API, Import utility will be well worth your time.

    • 3134 views
    • 4 answers
    • 0 votes
  • Agile Angel Asked on December 4, 2018 in IT and Networking.

    I was able to do this through javax.mail.  Google some examples of javax.mail and you should be able to find some answers for you. 
    I am succesfully able to run a script from my desktop or within Agile SDK that imports the javax.mail* and javax.mail.internet* packages and emails whoever I need to – even creates a .csv file or other various attachments if I need it!  Note that your company’s email settings may detect this kind of email as spam but I didn’t experience an issue in my company to all of the internal employees. 

    Google points like:  javax.mail, MimeMessage class, Transport.send() method, Internet Address for some examples. 

    Let us know if you need help.

    • 1616 views
    • 3 answers
    • 0 votes
  • Agile Angel Asked on September 27, 2018 in Agile PLM (v9).

    Try this too, as I understand how confusing it is sometimes to put the BOM table together:

    SELECT j.item_number AS parent_item, 
           find_number, 
           b.item_number, 
           i.description AS item_description, 
           quantity, 
           f.text        AS BOM_notes, 
           date01        AS phased_in, 
           date02        AS phased_out 
    FROM   agile.bom b 
           LEFT OUTER JOIN agile.agile_flex f 
                        ON b.item = f.id 
                           AND f.attid = 1036 
                           AND b.id = f.row_id 
           JOIN agile.item i 
             ON b.component = i.id 
           JOIN agile.item j 
             ON b.item = j.id 
    WHERE  change_out = ‘0’ 
           AND j.item_number = :parent_item; 

    • 3231 views
    • 9 answers
    • 0 votes
  • Agile Angel Asked on September 25, 2018 in Other APIs.

    You’re right, that was knowledge I got from a stack trace created by a Groovy script.

    No idea about Java PXs, but my gut instinct is to create a java PX that simply throws an Exception and prints the stack trace.  That may tell you more about the class next level up where it’s hard coded.

    • 1612 views
    • 3 answers
    • 0 votes
  • Agile Angel Asked on September 24, 2018 in Other APIs.

    You’re asking about whether you can change the “Job submitted for running asynchronous event subscribers in the background” to something different, right?  Example, Agile instead writes “See the comment made on this ECO for the results” or “Check the Event Subscriber Monitor for the results.”.  
    I seriously doubt it as that should be hard coded in the com.agile.agileDSL.ScriptMgr.AgileDSLMgrSessionBean.invokePostAction() class instead of your EventActionResult.doAction() class.

    • 1612 views
    • 3 answers
    • 0 votes
  • Agile Angel Asked on September 19, 2018 in Agile PLM (v9).

    You should be able to get away with just using the CHANGE_HISTORY table here through WORKFLOW_PROCESS is ok too.  The trickiest part is defining the requirements – namely, how do you want cycle count to be affected if the ECO was returned or rejected more than once?  Do you want it just the last time it was submitted compared to the last time it was returned?  Looks at the history tab of an ECO and then use the CHANGE_HISTORY or WORKFLOW_PROCESS tables (which query off of what you see in the history tab).  

    This query, for instance, shows me every time ECO1234 was moved from Pending to Submitted and from Submitted to Pending and returned 5 rows due to the Change’s back and forth history.  From here, I’d just want to lock down exactly what I wanted to see as well as some math to subtract two local_dates for the cycle time.  

    SELECT * 
    FROM   agile.workflow_process 
    WHERE  change_id = (SELECT id 
                        FROM   agile.change 
                        WHERE  change_number = ‘ECO1234’) 
           AND ( ( state = ‘59745’ 
                   AND next_state = ‘59742’ ) 
                  OR ( state = ‘59742’ 
                       AND next_state = ‘59745’ ) ) 
    ORDER  BY local_date;

    • 1505 views
    • 4 answers
    • 0 votes
  • Agile Angel Asked on September 11, 2018 in Other APIs.

    The main alternative here that I can think of is a POST event.  Upon ECO approval, and after your other PX has already blocked any signature from being registered when there’s missing fields on the ECO, write a different PX that will conduct a few checks (such as eco.audit(), missing fields, all-approve, etc.), then change the workflow.  Turn off auto-promote and just let your PX do the heavy lifting.  You can trigger this by ‘Approve for Workflow’ or even as a scheduled event w/ Query, among other options.  

    I empathize with you too – failed auto-promote messages don’t tell a user what was missing until someone goes in and manually tries to change the status.

    • 3144 views
    • 5 answers
    • 0 votes
  • Agile Angel Asked on September 10, 2018 in Agile PLM (v9).

    Hi Kevin, trying seeing if Oracle Doc ID 2213158.1, Doc ID 2251189.1, or Doc ID 1271285.1 help at all.  I remember reading about how basic and advanced searches can differ and can have issues.  Try those Doc IDs for some possible hints. That’s peculiar too – do you have a screenshot of this search?

    • 1982 views
    • 6 answers
    • 0 votes
  • Agile Angel Asked on September 10, 2018 in Other APIs.

    Mmmm…I’m pretty sure you can’t mix those two in a single script.  Regardless of whether or not the ECO had the mandatory attributes filled in or not, I’m very certain Agile would have bumped the object version up since Agile will log that your script ran to the history tab of that eco.  Therefore, when you then try to update the state, Agile’s trying to work off of an older version of the same ECO.  
    You can prove this by adding int obj_versionX = eco.objectVersion() or adding Boolean up_to_date = eco.isUpToDate() checks to your script.  

    Try adding the line eco.refresh() before the session.disableAllWarning(); line and see if that works.

    Nonetheless, I’ve read about bugs involved that make Agile throw the “This object has been modified” error, so if none the above tricks work for you, you may be facing something more complicated and will have to try different options like a POST event.

    • 3144 views
    • 5 answers
    • 0 votes
  • Agile Angel Asked on September 5, 2018 in Agile PLM (v9).

    Yes, I’d do a PX for this that either checks the object’s history tab or PX that does a quick database query check for the change (“select submit_date from agile.change where change_number = ?”).  Then if either method returns null, throw a new DSL Exception and block the Delete Object event type as Samalendu mentioned.  I can’t really think of any other way.

    • 1346 views
    • 3 answers
    • 0 votes