Hi,

I have an _if in a workflow where I need to check the values of a couple of
fields and also call a participant. This would be the pseudocode:

if ( ! (f:slot.blocked or f:slot.status == BLOCKED) or check_permissions) do
  // whatever
end

Where slot.blocked and slot.status are workitem fields and
check_permissions is a participant which gets some data from the workitem,
accesses a REST service and returns true if the user is allowed to perform
the action. What I currently have is this:

sequence do
  set 'v:blocked' => 'yes'

  _if '${f:slot.blocked} == true or ${f:slot.status} == BLOCKED' do
    _if do
      # Slot is blocked. Can the user open a blocked slot?
      check_permissions

      set 'v:blocked' => 'no'
    end

    # Implicit else (check_permissions): slot is blocked and user
unauthorized
    set 'v:blocked' => 'no'
  end

   _if '${v:blocked} == yes' do
    // whatever
  end
end

This looks to me to be unnecessarily verbose. So, is there a way of
combining variables and participant calls in an _if?

Thanks,
-Mario.


*Mario Camou* | *Co-Founder*
[email protected]
http://abstra.cc

Tanto este mensaje como todos los posibles documentos adjuntos al mismo,
son confidenciales y están dirigidos exclusivamente a los destinatarios de
los mismos. Por favor, si Usted no es uno de dichos destinatarios,
notifíquenos este hecho y elimine el mensaje de su sistema. Queda prohibida
la copia, difusión o revelación de su contenido a terceros sin el previo
consentimiento por escrito de “ABSTRA CC FACTORIA SOFTWARE, S.A.”. En caso
contrario, vulnerará la legislación vigente. Sus datos figuran en un
fichero propiedad de "ABSTRA CC FACTORIA SOFTWARE, S.A.". Si desea acceder
a sus datos, rectificarlos, cancelarlos u oponerse a su tratamiento,
diríjase por escrito a "ABSTRA CC FACTORIA SOFTWARE, S.A.", C/ Boix y
Morer, 6, 7 planta de Madrid, CP-28003.

Both this message and all possible documents attached to it, are
confidential and are intended exclusively to recipients of them. Please, if
you are not one of those recipients, notify us of this fact and delete the
message from your system. Copying, dissemination or disclosure of their
contents to third parties without the prior written consent of "ABSTRA CC
FACTORIA SOFTWARE, S.A." is prohibited. Otherwise, you violate the
legislation in force. Your data are contained in a file property of "ABSTRA
CC FACTORIA SOFTWARE, S.A.". If you want to access your data, rectify them,
cancel them or oppose its processing, submit in writing to "ABSTRA CC
FACTORIA SOFTWARE, S.A.", C/ Boix y Morer, 6, 7 floor Madrid, CP-28003.

-- 
you received this message because you are subscribed to the "ruote users" group.
to post : send email to [email protected]
to unsubscribe : send email to [email protected]
more options : http://groups.google.com/group/openwferu-users?hl=en

Reply via email to