public static TriggerConfiguration createConfiguration(String jobTriggerStrategy,TriggeredScrapeJobImpl triggeredScrapeJob) throws ScraperConfigurationException {
        Matcher matcher = TRIGGER_STRATEGY_PATTERN.matcher(jobTriggerStrategy);

        if(matcher.matches()){
            String triggerStrategy = matcher.group("strategy");
            String scheduledMs = matcher.group("scheduledInterval");
            if(logger.isDebugEnabled()) {
                logger.debug("Strategy: {}, scheduled ms: {}", triggerStrategy, scheduledMs);
            }

            String triggerVar = matcher.group("triggerVar");
            String comparatorString = matcher.group("comp");
            String comparatorVariable = matcher.group("compVar");

            switch (triggerStrategy){
                case TRIGGER:

                    if(triggerVar ==null || comparatorString==null || comparatorVariable==null){
                        throw new ScraperConfigurationException("TRIGGER_VAR trigger strategy needs the trigger-condition - information missing! given configString: "+jobTriggerStrategy);
                    }

                    List<TriggerElement> triggerElements = new ArrayList<>();

                    //TODO Change this (probably only 1 source to get the connection directly)
                    String connectionString = triggeredScrapeJob.getSourceConnections().get(triggeredScrapeJob.getSourceConnections().keySet().iterator().next());
                    TriggerElement triggerElement = new TriggerElement(
                        comparatorString,
                        null,
                        comparatorVariable,
                        triggerVar,
                        triggerStrategy,
                        connectionString);

                    triggerElement.setTriggerJob(triggeredScrapeJob.getJobName());
                    triggerElements.add(triggerElement);

                    String concatConn = matcher.group("concatConn");
                    String triggerVar2 = matcher.group("triggerVar2");
                    String comparatorString2 = matcher.group("comp2");
                    String comparatorVariable2 = matcher.group("compVar2");

                    if(triggerVar2 != null && comparatorString2 != null && comparatorVariable2 != null && concatConn != null){
                        TriggerElement triggerElement2 = new TriggerElement(
                            comparatorString2,
                            concatConn,
                            comparatorVariable2,
                            triggerVar2,
                            triggerStrategy,
                            connectionString);


                        triggerElement2.setTriggerJob(triggeredScrapeJob.getJobName());
                        triggerElements.add(triggerElement2);

                    }

                    //ToDo add clever Strategy to concat more than two conditions if needed
                    return new TriggerConfiguration(TriggerType.TRIGGER_VAR,scheduledMs,triggerElements,triggeredScrapeJob);
                case SCHEDULED:
                    if(triggerVar !=null || comparatorString!=null || comparatorVariable!=null){
                        throw new ScraperConfigurationException("SCHEDULED trigger strategy must only be used with scheduled interval - nothing more!  given configString: "+jobTriggerStrategy);
                    }
                    return new TriggerConfiguration(TriggerType.SCHEDULED,scheduledMs);
                default:
                    throw new ScraperConfigurationException("Unknown Trigger Strategy "+triggerStrategy);
            }


        }
        throw new ScraperConfigurationException("Invalid trigger strategy string description: "+jobTriggerStrategy);
    }
creates the TriggerConfiguration for a given ScrapeJob from triggerConfig-String
@param jobTriggerStrategy config-string from file
@param triggeredScrapeJob job belonging to the config
@return created TriggerConfiguration
@throws ScraperConfigurationException when something goes wrong
plc4j/tools/scraper/src/main/java/org/apache/plc4x/java/scraper/triggeredscraper/triggerhandler/TriggerConfiguration.java