Thank you for your detailed and thoughtful response. I truly appreciate you taking the time to share your insights and perspective on this requirement.
You've made some excellent points about the server-side nature of actions like Apply SLA and Create Follow Up WO. Your explanation about the need for syncing data and the complexities involved in replicating server-side logic on the client side is both clear and insightful. I can see how this approach would require significant effort and might introduce additional challenges.
Thanks again for your valuable input, and I'll be sure to reach out if there are any further developments or questions.
Original Message:
Sent: Thu November 28, 2024 03:45 PM
From: Aneesh Joseph
Subject: Calling application actions Ex.(Apply SLA - Create Workorder) through the app.xml or appcustomization.js
Hi Mostafa
This is an interesting requirement, so let me add my 2 cents. Actions like Apply SLA, Create Follow Up WO are all server-side actions, as I understand. They don't run on the client. So if you need to invoke them, you will need to call the method on the server, and the server would need the data in the database first.
I don't think you will be able to call these methods directly from your JavaScript, because even if you invoke them, the logic would run on the server, and this would mean that you would need to save and sync your data first.
If I understand correctly, your intent is to run this logic on client side, within your JavaScript. This would mean that you would need to replicate all the existing server-side logic into your JavaScript. You would also need access to SLA commitments etc, and you would need a local copy of this data.
This is just my 2 cents, but I think this could be quite a bit complicated. I think the easiest solution would be to sync your data first, and then invoke the server-side logic. Ofcourse, this would mean that you need connectivity.
Cheers
------------------------------
Aneesh Joseph
Director and Solutions Architect
objec3d
Melbourne, Australia
https://www.objec3d.com
Original Message:
Sent: Thu November 28, 2024 08:48 AM
From: Mostafa Mosaad
Subject: Calling application actions Ex.(Apply SLA - Create Workorder) through the app.xml or appcustomization.js
Hi Maycon,
Thank you so much for providing this detailed solution and the step-by-step guidance! I truly appreciate the effort and thought you've put into this. Your approach offers a clear starting point, and I'll definitely test it out to see how it works in my scenario.
To clarify, I'm discussing the general concept of invoking app actions within appcustomization.js, rather than focusing specifically on the SRMOBILE app. My aim is to explore the feasibility of triggering such actions dynamically across different apps within this framework.
Thanks again for your time and valuable insights!
Best regards,
------------------------------
Mostafa Mosaad
Software Engineer
Megasoft
Cairo
01117275779
Original Message:
Sent: Thu November 28, 2024 06:33 AM
From: Maycon Belfort
Subject: Calling application actions Ex.(Apply SLA - Create Workorder) through the app.xml or appcustomization.js
I 100% agree with Andrew. Having this in Manage would be simpler and better. You can add a field asking if a follow-up WO needs to be generated and handle this in Manage. As the user would only update the SR details, I believe it wouldn't impact the licensing (needs confirmation).
However, if you still think you need this, I'd try the following approach.
- In Maximo, you can add an action to the MXAPISR object structure, More Actions --> Action Definition.
- Add an action and give it a name.
- In the implementation type, try wsmethod and check if you can see the apply SLA option in the Method Name field.
- Optionally, you can add a sigoption to control this via security group.
- If you can't select the Apply SLA option, change the implementation type to script
- Create an automation script for integration using the Object Structure MXAPISR and write a code to apply the SLA, create follow up WO, etc.
- Select the automation script in the Script field of the Action Definition and Save.
You can check the detailed steps here: https://ibm-maximo-dev.github.io/maximo-restapi-documentation/action/action/
In Maximo Mobile, you'll need a button to trigger the action, so you can use the same button you already have created to save the changes.
In your button action, you can add something like this:
async buttonAction (evt) { let action = 'ACTION NAME'; // the action name defined in the Object Structure let item = evt.item; // assuming you have added the item to your button on-click-args let datasource = this.app.findDataSource('YOUR DS NAME'); let option = { record: item, headers: { 'x-method-override': 'PATCH', }, responseProperties: 'ticketid', // or any additional attribute from SR you want localPayload: { href: item.href, ticketid: item.ticketid, // use one of them depending on the datasource key attribute you have ticketuid: item.ticketuid, }, query: { interactive: false }, // you may want to change this to true }; try { await datasource.invokeAction(action, option); } catch (error) { this.app.log.log(error); // print the error msg in the log files }
I haven't tested this at all, but it's a start. Good luck.
------------------------------
If this post helps, please consider accepting it as a solution to help other members find it more quickly.
Maycon Belfort
Consultant
BPD Zenith
Melbourne
Original Message:
Sent: Thu November 28, 2024 04:22 AM
From: Andrew Jeffery
Subject: Calling application actions Ex.(Apply SLA - Create Workorder) through the app.xml or appcustomization.js
Hi Mostafa
Sorry I don't know the answer, I am functional rather than technical. Changing status on SR Mobile is deliberately not possible because it is an application that does not consume AppPoints. Therefore customising this capability will place your client in an ackward position if they were audited by IBM for license compliance. Let us say that there are 1000 self-service users who are found to have this change status capability, then I think IBM will be asking the client to add 2000 AppPoints to their registry, Authorized Limited User I think is 2 AppPoints. Your client will be in a bit of a battle, and they will probably be blaming your company for providing the functionality to flout licensing rules. Therefore, I'm sorry but this is a dangerous path you are following.
The argument which IBM can make is that you changed the profile of the application so much that it would now be considered a 3rd party mobile application which requires a Limited license.
What we need is the Maximo Mobile Approver app to have the same functionality as the old Supervisors Work Center which allowed the processing of Service Requests and turning them into Work Orders. That Maximo Mobile app is under the Limited license which does consume AppPoints, but then would probably be used by a smaller population of users.
This is a conversation I've had with others before, so this time I thought I had better put my thoughts on paper, although I am sure it isn't what you wanted to hear.
Regards - Andrew
------------------------------
Andrew Jeffery
Maximo SME
ZNAPZ b.v
Barnstaple
+44 (0)777 1847873
Original Message:
Sent: Thu November 28, 2024 03:56 AM
From: Mostafa Mosaad
Subject: Calling application actions Ex.(Apply SLA - Create Workorder) through the app.xml or appcustomization.js
Hi Andrew,
Thank you for your insights. While I completely understand the benefits of applying a common method like an Escalation or auto-initiating a small Workflow to handle SLAs and follow-up actions after the SR is created, my focus in this case is slightly different.
I am looking to implement this logic directly within the SRMobile app, specifically in the app.xml
or appcustomization.js
files. My goal is to allow the user to perform actions like reopening a resolved ticket (with a reason) and even creating a follow-up work order-all from the SRMobile app interface, without relying on Manage actions after syncing.
I've already implemented a button on the SR card to capture the reopening reason, change the ticket status, and update the relevant attributes. Now, I am exploring the feasibility of integrating more advanced actions, such as creating follow-up work orders, entirely from the SRMobile app.
Is there a way to call specific Manage application actions directly from the SRMobile app to achieve this, or would such an approach require custom APIs or additional configurations?
Looking forward to your thoughts on this.
Best regards,
Mostafa
------------------------------
Mostafa Mosaad
Software Engineer
Megasoft
Cairo
01117275779
Original Message:
Sent: Thu November 28, 2024 03:32 AM
From: Andrew Jeffery
Subject: Calling application actions Ex.(Apply SLA - Create Workorder) through the app.xml or appcustomization.js
Hi Mostafa,
There could be multiple ways in which a service request is created, through the Service Requests application, via Email Listener, through an integration, through a self service app, via the SRMobile, via another mobile application, from another Maximo application. All of these SRs potentially need an SLA being applied, so why not look for a common method, either an Escalation, or auto-initiate a small Workflow that applies the SLA and then Stops.
Regards - Andrew
------------------------------
Andrew Jeffery
Maximo SME
ZNAPZ b.v
Barnstaple
+44 (0)777 1847873
Original Message:
Sent: Wed November 27, 2024 06:32 AM
From: Mostafa Mosaad
Subject: Calling application actions Ex.(Apply SLA - Create Workorder) through the app.xml or appcustomization.js
Hello everyone,
Did anyone try or found a way calling application actions within the maximo application framework? so for example if am on SRMOBILE can i call the actions that already exists in service requests within Manage itself like Apply SLA, Create workorder etc.. whether that was from the app.xml or appcustomization.js
Thanks in advance
------------------------------
Mostafa Mosaad
Software Engineer
Megasoft
Cairo
01117275779
------------------------------