Is there an easy way to determine the origin of a trigger.
A mashup with 2 buttons triggering the same service.
Yup you are right
Doing some expressions evaluation and hidden checkboxes you may reach what you want, but won't be easy neither to explain here I'm sorry.
What you are trying to accomplish? maybe another way.
Button widgets have a ContextId property that you can set to a custom value for each button, i.e. button1 and button2. You can then pass this in to the service and do a check as to which context ID was being passed.
You can create a new service or two new services and add it/them between the click event and the service Add, to log the origin of the trigger (logger.info, etc) :
+1 _ Clicked --> LogButton1 _ Service invoke completed --> Add
+2 _ Clicked --> LogButton2 _ Service invoke completed --> Add
Ah, you're right -- you can't double bind the parameter with both context ids... in my head I was thinking you could pass it like a message with the clicked event of the button.
This may be a little wonky/messy, but one way you can do it is:
Then continue as I had posted above. This same result might be easier the way you suggested earlier, however.
Edit: Actually, you could simplify this on the mashup end by calling the GetGlobalSessionValues in the main service you want to call, instead of on the mashup. This way you could just bind ServiceInvokeComplete of each of the SetGlobalSession... services to the main service you want to call, and get the current contextId in that service before doing your if or switch statement to see which one is the current clicked property. Note that I wouldn't use the contextId from the session tab in the mashup, because it may not get updated when you call the SetGlobalSession.. services.