133
Points
Questions
2
Answers
17
-
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
-
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
-
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
-
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
-
- 875 views
- 3 answers
- 0 votes
-
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
-
- 803 views
- 1 answers
- 0 votes
-
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
-
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
-
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