Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Web Service Action Does Not Retain Look Up Fields #186

Open
thebenkahn opened this issue May 19, 2022 · 1 comment
Open

Web Service Action Does Not Retain Look Up Fields #186

thebenkahn opened this issue May 19, 2022 · 1 comment

Comments

@thebenkahn
Copy link

thebenkahn commented May 19, 2022

Hello - the web service step as an action is an awesome addition! I did notice that the step results after a web service step complete only contain the Webservice Function: data error exception fields. This seems to mean that look up fields from any previous steps are not available in subsequent steps, although they are still listed under 'Available fields' in the form when adding more steps. You can do a look up on the original event again but I don't believe that is intended/doesn't work that way with other action types?

Attaching a workflow as an example. Should work as is to test on a site with a least one course (id=2) and the Course Creator role (role id =2). On user creation it looks up the user, runs a WS action, looks them up again, and assigns a role.

  1. Import workflow
  2. Create a user
  3. Verify user added to course 2 via a WS action and assigned role 2 via a role assignment action
  4. Edit the workflow, and remove the "look up again" step
  5. Rerun the workflow or create another user
  6. Observe the the enroll via WS action works but role action errors since the user_id lookup field is not present

Webservice_Testing_20220519_1834.zip

@Peterburnett
Copy link
Contributor

Hi @thebenkahn, thanks for the great bug report. We have just hit this internally, and Ive nailed the error down to some dodgy open transaction handling, and some weird behaviour from the Moodle WS API. I should have this fixed soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants