Processing objects using Ma Client Server
Hari Balaraman
hari.balaraman at icloud.com
Thu Apr 27 01:54:47 UTC 2017
Hi All,
I'm struggling with trying to implement conditionality in Server processing. What I am doing now is:
myServer
processOn: 12345
using:
[ :requestObject |
[requestObject processThis] fork. responseObject ]
This allows processThis to happen and responseObject to come back.
What I'd like to do is:
myServer
processOn: 12345
using:
[ :requestObject |
[requestObject is MemberOf:A] ifTrue:[(requestObject instVarL)='somevalue' ifTrue:[ ResponseObject1 instVarA:( (requestObject instVarL) ) ].]
[requestObject is MemberOf:B] ifTrue:[(requestObject instVarT)='somevalue' ifTrue:[ ResponseObject2 doSomething:(requestObject)].]
]
I'd like to get a response without forking.... so that the responseObject is based on the conditionality and the value of one of its instance variables is based on some processing of an instance variable of the requestObject.
Is there something structurally wrong with what I am trying to do, i.e. introduce conditionality within the processOn method?
Kind regards,
Hari
More information about the Magma
mailing list