Project

General

Profile

Actions

Task #637

closed

Create LRT that can execute IdmScripts

Added by Ondřej Kopr over 6 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Ondřej Kopr
Category:
Long running task
Target version:
Start date:
08/08/2017
Due date:
% Done:

100%

Estimated time:
Owner:

Description

Create long running task that can execute IdmScript (BASIC?, SYSTEM?)

Actions #1

Updated by Ondřej Kopr over 6 years ago

  • Priority changed from Low to Normal
Actions #2

Updated by Ondřej Kopr over 6 years ago

  • Status changed from In Progress to Needs feedback
  • Assignee changed from Ondřej Kopr to Radek Tomiška
  • % Done changed from 0 to 90

Try implemented with FunctionalInterface, after read some examples, our APIs and consulting with team, i decided to send complete task instance. (for method setCounter, setCount, updateState)

Test script:

org.slf4j.Logger LOG = org.slf4j.LoggerFactory.getLogger("test_script");

task.setCounter(0l);
task.setCount(10l);

for (int index = 0; index < 10; index++) {
    LOG.info("Run: [{}]", index );
    Thread.sleep(300L);
    task.increaseCounter();
    task.updateState();
}

Script authorities:
java.lang.Thread
eu.bcvsolutions.idm.core.scheduler.task.impl.ExecuteScriptTaskExecutor

commit: https://github.com/bcvsolutions/CzechIdMng/commit/d65a8aec67ffce341b1146574cc0d6cbdf79f0cb
Tests are include. Please Radek could you check this solution? Thank you.

Actions #3

Updated by Radek Tomiška over 6 years ago

  • Status changed from Needs feedback to In Progress
  • Assignee changed from Radek Tomiška to Ondřej Kopr

I did review, it looks ok. Only rename method canExecute and merge it into develop, thx .).

Actions #4

Updated by Ondřej Kopr over 6 years ago

  • Status changed from In Progress to Resolved
  • % Done changed from 90 to 100
Thanks for feedback,
  • change method name canExecut to canExecute, thanks :),
  • merged.

Thank you.

Actions #5

Updated by Ondřej Kopr over 6 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF