Yeah, yeah, you are correct, I am a little bit confused. So I have 2 questions right now:
Appreciate your consultation in both threads, Andrew.
Original Message:
Sent: Wed July 02, 2025 10:38 AM
From: Andrew Jeffery
Subject: Create Workorder From SRs Using Escalation
Sorry Abdullah but I don't understand. The original question was about generating a work order from a service request. You latest response refers to a PM, there is no connection between a PM and a service request in Maximo.
What application are you in and what action is being used?
If you are in Work Order Tracking on a PM work order and you are creating a follow-up Service Request then are you trying to copy the tasks of the work order to become activities of the ticket (Service Request)? That is not possible in Maximo.
Can you clarify your need starting with the application and action you are performing.
------------------------------
Andrew Jeffery
Maximo SME
ZNAPZ b.v (a Naviam company)
Barnstaple
+44 (0)777 1847873
Original Message:
Sent: Wed July 02, 2025 09:52 AM
From: Abdullah Blal
Subject: Create Workorder From SRs Using Escalation
Hi Andrew,
I hope you are well.
the point here is that my work orders will be created upon the following:
- PM will generate the work orders automatically
- the desired attributes that I want it to be crossed, it presented on the job tasks table, and I want to cross them to the wo activity table of the created work orders
- I have tried some crossover domains but with no luck in achieving what I want.
------------------------------
Abdullah Blal
Software Engineer
Megasoft
Giza
+201155119254
Original Message:
Sent: Thu June 26, 2025 06:42 AM
From: Andrew Jeffery
Subject: Create Workorder From SRs Using Escalation
Hi Abdullah,
Set the owner, it will automatically change SR status to QUEUED.
Create the Work Order(s), there are several options.
The TICKET2WO crossover domain will fire automatically, there is nothing to do, but you may need to place conditions as to when data is copied.
There are automatic updates of status from WO back to SR so status will go to INPROG based on first WO going to INPRG. If needed create additional SR status at QUEUED level to indicate when WO created.
Apply WO SLA via Workflow or Escalation on WO object, not via SR script.
Try to avoid Scripting use OOB functionality, and script only if client cannot adopt OOB. It is very common for customisation to be removed, several years after it was developed, when clients realise it is better in the long run not to carry the burden of excessive scripts.
Regards Andrew
------------------------------
Andrew Jeffery
Maximo SME
ZNAPZ b.v
Barnstaple
+44 (0)777 1847873
Original Message:
Sent: Mon June 23, 2025 10:55 AM
From: Abdullah Blal
Subject: Create Workorder From SRs Using Escalation
thanks for your reply, so can you tell me the right arrangement of the action group to achieve the following :
- Set the owner to the current ticket
- Change status to inprog
- Create a work order
- Copy values of the workorder ==> as in your reply, I will consider all my fields in the crossover domain, which is logically true.✅
- apply sla on the newly created work order
------------------------------
Abdullah Blal
Software Engineer
Megasoft
Giza
+201155119254
Original Message:
Sent: Mon June 23, 2025 09:12 AM
From: SANJAY PATIL
Subject: Create Workorder From SRs Using Escalation
Questions:
1. When should a Work Order (WO) be created from a Service Request (SR) in NEW status?
If, after thorough analysis, you determine that creating an Escalation is the best approach, please consider the following:
Steps to Implement Escalation Logic:
1. Define the Escalation Criteria:
- Create an Escalation with a well-defined
where
clause. - I noticed you've added
internal priority
to the script. If this is a field on the SR you are referring to then, include it in the Escalation where clause criteria. - Ensure the Escalation targets only the correct SRs for which a WO should be created. So, you can try to add all possible SR conditions that should be met.
- To avoid creating duplicate WOs for the same SR, include a nested condition in the
where
clause to check that a WO does not already exist. Instead of relying solely on createdate
, consider using a combination of SR status (NEW
) and WO reported date
for better accuracy. Because I saw you used MAX().
2. Use Out-of-the-Box (OOB) Features Where Possible:
- If available in your environment, leverage the OOB crossover domain
TICKET2WO
to transfer values from SR to WO. - This approach minimizes the need for custom scripting to copy values, keeping your script cleaner and easier to maintain for future attributes added on SR.
3. Simplify Script Logic:
- Avoid using
MXServer
in your script. The Escalation provides a reference to the SR MBO. - Use the relationship and the OOB
createWorkorder()
method to generate the WO directly from the SR.
Hope this helps! Let me know if you'd like help drafting the actual where
clause or reviewing your current script.
------------------------------
SANJAY PATIL
Original Message:
Sent: Sat June 21, 2025 07:45 PM
From: Abdullah Blal
Subject: Create Workorder From SRs Using Escalation
Hello Everyone, now i am trying to create workorder for each SR with status NEW but i want to make this process through Automation Script because i want to copy some specific fields from the sr to the created workorder.
I have tried the following:
- first method: i have created the escalation with condition status = 'NEW'
- Empty condition Escalation Point
- action group which have:
- Applicaiton Action Create WO
- Script that copy my desired fields, change current sr status to inprogress and apply sla on the workorder
the escalation is running and only the first action is seems done but the script is not running or running without making what i am waiting for.
i have attached the script.
the used relation in the script is from SR to Workorder ==> status = 'NEW'
AND origrecordclass = 'SR'
AND origrecordid = :ticketid
AND createdate = (
SELECT MAX(createdate)
FROM workorder
WHERE origrecordclass = 'SR'
AND origrecordid = :ticketid
AND status = 'NEW'
)
-----------------------------------------------------------------------------------------------
Also i have tried to create the workorder from scratch using an script without using the application action and then copy the desired attributes and then appling the SLA on the created workorder by invoking workflow from the script that has apply SLA application action.
I have attached the script .
----------------------------------------------------------------------------------------------
Both ways are not working i need to know why.
------------------------------
Abdullah Blal
Software Engineer
Megasoft
Giza
+201155119254
------------------------------