Project

General

Profile

Task #2564

Pass provisioning context to scripts

Added by Peter Štrunc 9 months ago. Updated 5 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Provisioning
Target version:
Start date:
11/06/2020
Due date:
% Done:

100%

Estimated time:
Milestones:

Description

Provisioning context is not passed to a script in provisioning mapping.

scriptEvaluator.evaluate(
    scriptEvaluator.newBuilder()
        .setScriptCode('SCRIPT')
        .addParameter('scriptEvaluator', scriptEvaluator)
        .addParameter('uid', uid)
        .addParameter('attributeValue', attributeValue)
        .addParameter('entity', entity)
        .addParameter('system', system)
    .build());

I propose that we should pass the context to scripts if it is defined for the given mapping.

scriptEvaluator.evaluate(
    scriptEvaluator.newBuilder()
        .setScriptCode('SCRIPT')
        .addParameter('scriptEvaluator', scriptEvaluator)
        .addParameter('uid', uid)
        .addParameter('attributeValue', attributeValue)
        .addParameter('entity', entity)
        .addParameter('system', system)
        .addParameter('context', context)
    .build());

Related issues

Related to CzechIdM - Task #1296: Script - support one script in more categoriesNew10/04/2018

History

#1 Updated by Peter Štrunc 9 months ago

  • Description updated (diff)

#2 Updated by Vít Švanda 8 months ago

  • Target version changed from 10.7.0 to 10.8.0

#3 Updated by Vít Švanda 7 months ago

  • Assignee changed from Vít Švanda to Ondrej Husník

#4 Updated by Vít Švanda 6 months ago

  • Status changed from New to In Progress
  • Assignee changed from Ondrej Husník to Vít Švanda

#5 Updated by Vít Švanda 6 months ago

  • % Done changed from 0 to 90

Solved within AD wizard #2627.

Solved problem with removing "attributeValue/context" varialbes form script for basic ACM.

Commit: https://github.com/bcvsolutions/CzechIdMng/commit/11f6900001d269d8d62fb13e86babc4e2b4a4031

#6 Updated by Vít Švanda 5 months ago

  • Status changed from In Progress to Needs feedback
  • Assignee changed from Vít Švanda to Radek Tomiška

#7 Updated by Radek Tomiška 5 months ago

  • Related to Task #1296: Script - support one script in more categories added

#8 Updated by Radek Tomiška 5 months ago

  • Status changed from Needs feedback to Resolved
  • Assignee changed from Radek Tomiška to Vít Švanda
  • % Done changed from 90 to 100

I did test and code review, ''context'' attribute is added, when selected script is in "Transformation to a system" category, thx!

I added category into selectbox option:
https://github.com/bcvsolutions/CzechIdMng/commit/5177fe798c823ca4ec82c5a117620812e6f37135

#9 Updated by Radek Tomiška 5 months ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF

Go to top