Not sure what "limit 1" means for you. Usually, workflow is performed on the current record.
Not sure of the purpose of your address pool, pls explain what you want to achieve (there may be other tech solutions)
You may want to ask your Q on Atrium/AR System, a lot more developers there.
Good luck JT,
1 of 1 people found this helpful
You don't mention addional records. Will there be more records in this form?
If I understand this...you have the IP address record existing in this form and you will be assigning it to a customer?
The push fields action has a qualification associated with it with options to handle whether the record is found or not and whether to update the first record or all records found. So it would depend on how you setup the qualification statement. If I am understanding your scenario...you would have workflow first check the status of the record and then if it is available push the customer value to it and change the status.
Thanks for responding so quickly! I did not realize there was an Atrium/AR System community. This discussion would probably be better suited in that community. Please feel free to move the discussion if you would like.
I am attempting to store a pool of IP addresses in a form. This form will have multiple entries for available and used IP addresses. When a new customer signs up, I want to retrieve the first unused address from the pool. I am using Atrium Orchestrator's Remedy ARS adapter to perform a query-update. Essentially, I am telling AO to update the Customer = $customer (variable) and the Status = "In-Use" where 'Status' = "Available". The problem is that this updates all the entries where 'Status' = "Available". I only want this command to update the first entry. In MySQL I can use the syntax "LIMIT 1" to only act on one entry. In Oracle the same function is accomplished with the qualifier "where rownum=1". I'm trying to determine if it is possible to accomplish the same functionality in a regular Remedy ARS form.
Today the customer requested that we model the pools in the CMDB instead of a regular ARS form. The CMDB web service API has the ability to limit the number of entries returned, however I do not see a way to query and update in the same API transaction. This leaves the potential for query (request customer #1) => 192.168.0.1, query (request customer #2) => 192.168.0.1, update (request customer #1) 192.168.0.1 is "In-Use" by customer #1, then update (request customer #2) 192.168.0.1 is "In-Use" by customer #2. In computer science this is called the readers writers problem (http://syncgen.projects.cis.ksu.edu/documentation/examples/readerwriter.shtml). Through the web service API, is there any way to query and update a CI in the same transaction (database locked for both requests)?
Thanks again for all your help!
In response to [If I understand this...you have the IP address record existing in this form and you will be assigning it to a customer?]:
Yes, you are exactly right.
Sorry for the stupid question, but how would you go about using the push fields action? Would you create an Active Link or Filter? If so, what type of mechanism would you use to trigger the Active Link/Filter?
the IP adress is a CI, not the IP-Pool (not a configuration item - it's a management tool).
So the IP-Pool dynamic management can be done outside of Atrium CMDB.
Moving this Q from SvcSupport-General to AR System.
To update the first record you can use this statement in DIRECT SQL action on FILTER/AL
update top (1) IP_Pool set Status='In-Use', Customer='001234' where Status = 'Available'
To capture the customer name dynamically use $Customer$
Yeah, native AR workflow does the job ..
Create a filter/Active link with DIRECT SQL action thats it..
I think you can make use of a push field action in an AL /Filter to modify the first matching request.
push if :
If no request match :Take no action
If any request match:Modify the First matching Request
I love this
Using DirectSQL within an A/Link or filter doesn't really qualify as 'native' Remedy!! LOL
Your later answer is better - Modify first matching request
In response to Vishnu's Push If example, that is exactly what I meant by stating, "The push fields action has a qualification associated with it with options to handle whether the record is found or not and whether to update the first record or all records found. So it would depend on how you setup the qualification statement."