Skip to content

Commit 6df5259

Browse files
authored
Added the tenant as a process variable (#212)
1 parent 3634e4a commit 6df5259

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/main/java/org/folio/rest/delegate/SetupDelegate.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
public class SetupDelegate extends AbstractRuntimeDelegate {
2323

2424
private final static String TIMESTAMP_VARIABLE_NAME = "timestamp";
25+
private final static String TENANT_VARIABLE_NAME = "tenantId";
2526

2627
@Autowired
2728
private ScriptEngineService scriptEngineService;
@@ -53,6 +54,7 @@ public void execute(DelegateExecution execution) throws Exception {
5354
String timestamp = String.valueOf(System.currentTimeMillis());
5455

5556
execution.setVariable(TIMESTAMP_VARIABLE_NAME, timestamp);
57+
execution.setVariable(TENANT_VARIABLE_NAME, execution.getTenantId());
5658

5759
logger.info("loading scripts");
5860

0 commit comments

Comments
 (0)