Forum Discussion

santia2c's avatar
santia2c
Regular Visitor
9 years ago

How can one use triggers in Collaborator?

I am trying to create a trigger in Collaborator that will pop up a window alerting users to review the entries in their review before advancing to the next phase. But the instructions in the help pages seem too vague. What I need is a real example. Can someone help?

2 Replies

  • caseatmtr6's avatar
    caseatmtr6
    New Contributor

    Hello,

     

    Not so difficult to set up.

    Take example on our Collab server.

     

    Server is connected to LDAP. Unfortunately, the only data people use to provide are just ID and password.

    It's not enough, we would like full name (as ID is provided by the company and is made of a letter and 7 digits, which is hard to identify persons) and email information as well.

    Furthermore, we decided to normalized the ID, having the first letter in lowercase... (knowing that windows is not case snsitive!)

     

    Hence, we looked at the available triggers, and there is one fired after the creation of a user. That's nice for our needs!

    So, the next step is quite simple. We wrote a shell script (our server installation is on Linux, but I guess that it would not be a great issue to write a script in whatever language, even within windows), called newUser.sh, and we provided its path to the trigger named "User created", with some parameter (for our case the only information we need is the ID used by the new user).

    Here is a screen capture for that:

    (Note: the 'ops' parameter exists because we have a second test server, and we would like the script to be able to differenciate the origin of the call (in order to send the modification to the right collaborator server :manhappy: )

     

    The script by itself has not a big interest, I think, it prepares only the right argument to pass with the collaborator 'ccollab' command-line client.

    For our case we use the command 'ccollab admin user edit' with the necessary arguments (--new-login, --email, etc... - refer to the documentation)

     

    Well! Hope that helps in understanding the trigger mechanism...

     

    Regards

  • creyes17's avatar
    creyes17
    New Contributor

    Hi Santia2c,

     

    I don't work at Collaborator so I'll defer to anyone official. From what I can tell though, the configurable Triggers from the admin menu can only be used to run scripts. Additionally, they are only executed after the trigger occurs. For this reason, I don't think there's a way to use the Triggers functionality to interrupt the user from advancing phases with a popup.

     

    There might be an alternate way to accomplish this that I'm unaware of though; again I'll defer to SmartBear here.

     

    Best,

    ~Chris