scheduler/src/main/java/com/cognitree/kronos/scheduler/TaskService.java
/**
     * Updates dynamic workflow task property defined at a workflow level as ${workflow.prop_name}
     *
     * @param taskProperties
     * @param propertiesToOverride
     * @return
     */
Updates dynamic workflow task property defined at a workflow level as ${workflow.prop_name}
@param taskProperties
@param propertiesToOverride
@return
Updates dynamic workflow task property defined at a workflow level as $ { workflow . prop_name } @param taskProperties @param propertiesToOverride @return
private Map<String, Object> modifyAndGetTaskProperties(Map<String, Object> taskProperties,
                                                           Map<String, Object> propertiesToOverride) {
        final HashMap<String, Object> modifiedTaskProperties = new HashMap<>();
        for (Map.Entry<String, Object> entry : taskProperties.entrySet()) {
            final Object value = entry.getValue();
            if (value instanceof String &&
                    ((String) value).startsWith(DYNAMIC_VAR_PREFIX) &&
                    ((String) value).endsWith(DYNAMIC_VAR_SUFFFIX) &&
                    ((String) value).contains(WORKFLOW_NAMESPACE_PREFIX)) {
                String valueToReplace = ((String) value).substring(DYNAMIC_VAR_PREFIX.length(),
                        ((String) value).length() - DYNAMIC_VAR_SUFFFIX.length()).trim();
                valueToReplace = valueToReplace.substring(WORKFLOW_NAMESPACE_PREFIX.length());
                modifiedTaskProperties.put(entry.getKey(), propertiesToOverride.get(valueToReplace));
            } else if (value instanceof Map) {
                final Map<String, Object> nestedProperties =
                        modifyAndGetTaskProperties((Map<String, Object>) value, propertiesToOverride);
                modifiedTaskProperties.put(entry.getKey(), nestedProperties);
            } else {
                modifiedTaskProperties.put(entry.getKey(), value);
            }
        }
        return modifiedTaskProperties;
    }
private Map < String , Object > modifyAndGetTaskProperties ( Map < String , Object > taskProperties , Map < String , Object > propertiesToOverride ) { final HashMap < String , Object > modifiedTaskProperties = new HashMap < > ( ) ; for ( Map . Entry < String , Object > entry : taskProperties . entrySet ( ) ) { final Object value = entry . getValue ( ) ; if ( value instanceof String && ( ( String ) value ) . startsWith ( DYNAMIC_VAR_PREFIX ) && ( ( String ) value ) . endsWith ( DYNAMIC_VAR_SUFFFIX ) && ( ( String ) value ) . contains ( WORKFLOW_NAMESPACE_PREFIX ) ) { String valueToReplace = ( ( String ) value ) . substring ( DYNAMIC_VAR_PREFIX . length ( ) , ( ( String ) value ) . length ( ) - DYNAMIC_VAR_SUFFFIX . length ( ) ) . trim ( ) ; valueToReplace = valueToReplace . substring ( WORKFLOW_NAMESPACE_PREFIX . length ( ) ) ; modifiedTaskProperties . put ( entry . getKey ( ) , propertiesToOverride . get ( valueToReplace ) ) ; } else if ( value instanceof Map ) { final Map < String , Object > nestedProperties = modifyAndGetTaskProperties ( ( Map < String , Object > ) value , propertiesToOverride ) ; modifiedTaskProperties . put ( entry . getKey ( ) , nestedProperties ) ; } else { modifiedTaskProperties . put ( entry . getKey ( ) , value ) ; } } return modifiedTaskProperties ; }
Updates dynamic workflow task property defined at a workflow level as ${workflow.prop_name}
 @param taskProperties
 @param propertiesToOverride
 @return
Updates dynamic workflow task property defined at a workflow level as $ { workflow . prop_name } @param taskProperties @param propertiesToOverride @return