dmcdonald01's Profile
Agile Talent
133
Points

Questions
2

Answers
17

  • Agile Talent Asked on September 6, 2023 in Agile PLM (v9).

    This sounds like an issue with the File Folder Auto Number config.  It may have been reset and is attempting to create File Folder numbers that already exist.  I’d start by changing the File Folder Auto number config with a new number syntax or setting the starting number to a number that doesn’t exist yet.

    • 653 views
    • 1 answers
    • 0 votes
  • Agile Talent Asked on June 7, 2023 in Software Development Kit (API).

    Hi MrMathison,

    This works for me…

     

    IAgileSession session = AgileLoginCalls.connect();
    IAdmin admin = session.getAdminInstance();
    INode locationsNode = admin.getNode(NodeConstants.NODE_SERVER_LOCATION);
    IProperty prop = locationsNode.getProperty(PropertyConstants.PROP_DB_SERVER_HOSTNAME);
    System.out.println("Current Value: " + prop.getValue());

    • 572 views
    • 1 answers
    • 0 votes
  • Agile Talent Asked on May 17, 2023 in Product Collaboration.

    Hi,

    You would have to still manually connect to an IAgileSession as you would with any other SDK program.  However, you can do this by coding your credentials, or by having the URL use the HttpServletRequest to fetch the user who is logged in and launched the PX.

    For configuring the PX, You specify the page of your web app in the “Process Extension” node of the Java Admin Client.  When launched form ACtions menu, Agile will suffix thje URL configured with object information so the web app can determine what object the URL PX was launched from.

    Example

    http://[HOST]/MyWebApp/RunThisServlet?agile.classID=2472552&agile.1047=DEVIATION123&agile.userName=dmcdonald01&ContextType=Deviation&ContextName=DEVIATION

    Only part of URL specified in Admin Client is http://[HOST]/MyWebApp/RunThisServlet but Agile will throw on the rest.

    Then in your web app:

    private String getResponse(HttpServletRequest request) throws Exception {
         String response = new String();
         URL = "http://" + host + ":7001/Agile";
         HashMap<Integer, HttpServletRequest> params = new HashMap<Integer, HttpServletRequest>();
         params.put(AgileSessionFactory.PX_REQUEST, request);
         AgileSessionFactory factory = AgileSessionFactory.getInstance(URL);
         IAgileSession s = factory.createSession(params);     
         String user = request.getParameter("agile.userName");
         String num = request.getParameter("agile.1047");
         IChange ichg = (IChange) s.getObject(IChange.OBJECT_TYPE, num);
        //Do Something
          return response;
    }

     

    Hope this helps!

    • 995 views
    • 1 answers
    • 0 votes
  • Agile Talent Asked on May 9, 2023 in Engineering Collaboration.

    You would need to set this up as a Synchronous, Pre Trigger Update Title Block event.  During the Pre-Event, you would need to fetch the IEventDirtyCell for each attribute A1 & A2 and then triage from there.  Throw a new Exception if IEventDirtCell for A2 is null (meaning its not updated) which will error the “Save”

     

    IDataObject ido = uEvent.getDataObject();
    IAgileClass cls = ido.getAgileClass();

    IAttribute a1Att = cls.getAttribute(“A1AttributeID”);
    IAttribute a2Att= cls.getAttribute(“A2AttributeID”);

    IEventDirtyCell a1EDC= uEvent.getCell(a1Att.getId());
    IEventDirtyCell a2EDC = uEvent.getCell(a2Att.getId());

    if(a1EDC.getValue().ToString().contains(“OTHERS”) && a2EDC ==null){

    //A1 is set to others but A2 is not modified

    throw new Exception( “A1 is set to others but A2 is not modified. Please try again”_;

    }

    • 723 views
    • 1 answers
    • 0 votes
  • Agile Talent Asked on March 28, 2023 in Software Development Kit (API).

    You could catch the exception in a try & catch(APIException e) and then print out e.getRootCause().  Based on the Audit Exception, my guess is there are required fields at the release status (perhaps Revision??) that are not filled in.

    • 875 views
    • 3 answers
    • 0 votes
  • Agile Talent Asked on March 3, 2023 in Product Collaboration.

    Here’s how I do it with IUpdateTableEventInfo for attachments but would work similar for Affected Items table.  Note the Event Action specifies to do something if its EventConstants.DIRTY_ROW_ADD_ROW.  Another UpdateTable event will be triggered when you update the cell you want to set, but I think that would give a DIRTY_ROW_UPDATE_ROW event action

     

    IUpdateTableEventInfo info = (IUpdateTableEventInfo) event;
    IObjectEventInfo ioeInfo = (IObjectEventInfo) event;
    IEventDirtyTable edt = info.getTable();
    Iterator<?> it = edt.iterator();
    while (it.hasNext()) {
         IEventDirtyRow aRow = (IEventDirtyRow) it.next();
         if (aRow.getAction() == EventConstants.DIRTY_ROW_ACTION_ADD_FILE || aRow.getAction() == EventConstants.EVENT_CHECK_IN_FILES) {
              IDataObject ido = info.getDataObject();
    //Set your cell value here against the ido
    } else {
            continue;
         }
    }

    • 829 views
    • 1 answers
    • 0 votes
  • Agile Talent Asked on January 27, 2023 in Agile PLM (v9).

    Are you updating additional Title Block attributes via your script? I believe i had the same issue previously.  Update Title Block post event is triggered once when title block is updated in web client, and then again if your script is setting additional attributes,

    • 803 views
    • 1 answers
    • 0 votes
  • Agile Talent Asked on December 2, 2022 in Agile PLM (v9).

    We’ve set up a custom External URL PX tool for many self-serve custom reports that aren’t handled by out-of-the-box Agile.  Its a webapp that houses many custom reports that prompts users for certain report options.  One of them us a multiple item where-used report which takes part numbers from a text box (each part number on a different row), parses for unique numbers, and then performs a where used search on each number, and presents the user with a single Excel file of the results.  Bit of work to set up but we rely heavily on some of these custom reports.

    • 1445 views
    • 3 answers
    • 0 votes
  • Agile Talent Asked on June 6, 2022 in Product Collaboration.

    Personally, I usually check this by fetching the IAgileClass of the affected item, and then using the isSubclassOf method:

    ITable affectedItems = ichg.getTable(ChangeConstants.TABLE_AFFECTEDITEMS);

    Iterator it = affectedItems.Iterator();

    while(it.hasNext()){

         IRow row =(IRow)it.next()

         IAgileClass subcls = row.getReferent().getAgileClass();

         if(subcls.isSubclassOf("Documents"){

             //ignore

         else if(subcls.isSubclassOf("Parts"){

         //DoSomething

         }

    }

     

    • 1750 views
    • 3 answers
    • 0 votes
  • Agile Talent Asked on August 25, 2021 in Agile PLM (v9).

    Hi Jackie,

    I believe this is an issue with the workflow configuration in the admin client.  You would have to check that workflow configuration and then go to the Released status and make sure that there is a criteria there that matches the parts you are trying to release.  Its possible your affected items or MCO don’t meet any of the defined criteria and I believe that would be why you encounter that error.

     

    • 684 views
    • 1 answers
    • 0 votes