kandi background
Explore Kits

workflow | Neuro4j Workflow is a light-weight workflow engine | BPM library

 by   eternita Java Version: v.3.4.1 License: Non-SPDX

 by   eternita Java Version: v.3.4.1 License: Non-SPDX

Download this library from

kandi X-RAY | workflow Summary

workflow is a Java library typically used in Automation, BPM, Framework applications. workflow has no vulnerabilities, it has build file available and it has high support. However workflow has 19 bugs and it has a Non-SPDX License. You can download it from GitHub.
[![Build Status](https://secure.travis-ci.org/eternita/workflow.png?branch=master)](https://travis-ci.org/eternita/workflow) [![Coverage Status](https://coveralls.io/repos/github/eternita/workflow/badge.svg)](https://coveralls.io/github/eternita/workflow) [![Maven Central](https://maven-badges.herokuapp.com/maven-central/org.neuro4j/workflow/badge.svg)](https://maven-badges.herokuapp.com/maven-central/org.neuro4j/workflow).
Support
Support
Quality
Quality
Security
Security
License
License
Reuse
Reuse

kandi-support Support

  • workflow has a highly active ecosystem.
  • It has 51 star(s) with 33 fork(s). There are 12 watchers for this library.
  • It had no major release in the last 12 months.
  • There are 0 open issues and 6 have been closed. On average issues are closed in 22 days. There are no pull requests.
  • It has a positive sentiment in the developer community.
  • The latest version of workflow is v.3.4.1
workflow Support
Best in #BPM
Average in #BPM
workflow Support
Best in #BPM
Average in #BPM

quality kandi Quality

  • workflow has 19 bugs (1 blocker, 0 critical, 16 major, 2 minor) and 465 code smells.
workflow Quality
Best in #BPM
Average in #BPM
workflow Quality
Best in #BPM
Average in #BPM

securitySecurity

  • workflow has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
  • workflow code analysis shows 0 unresolved vulnerabilities.
  • There are 12 security hotspots that need review.
workflow Security
Best in #BPM
Average in #BPM
workflow Security
Best in #BPM
Average in #BPM

license License

  • workflow has a Non-SPDX License.
  • Non-SPDX licenses can be open source with a non SPDX compliant license, or non open source licenses, and you need to review them closely before use.
workflow License
Best in #BPM
Average in #BPM
workflow License
Best in #BPM
Average in #BPM

buildReuse

  • workflow releases are available to install and integrate.
  • Build file is available. You can build the component from source.
  • Installation instructions are not available. Examples and code snippets are available.
  • workflow saves you 5080 person hours of effort in developing the same functionality from scratch.
  • It has 10685 lines of code, 737 functions and 230 files.
  • It has low code complexity. Code complexity directly impacts maintainability of the code.
workflow Reuse
Best in #BPM
Average in #BPM
workflow Reuse
Best in #BPM
Average in #BPM
Top functions reviewed by kandi - BETA

kandi has reviewed workflow and discovered the below as its top functions. This is intended to give you an instant insight into workflow implemented functionality, and help decide if they suit your requirements.

  • Writes the message to System out .
    • Creates a UUID .
      • Create a node .
        • Lookup a custom node .
          • Checks the type of the parameter .
            • Retrieves the configuration for a command .
              • Evaluate parameter value .
                • Get the next transition
                  • Executes the given flow .
                    • Parse a flow parameter .

                      Get all kandi verified functions for this library.

                      Get all kandi verified functions for this library.

                      workflow Key Features

                      Neuro4j Workflow is a light-weight workflow engine for Java with Eclipse-based development environment. Workflow allows to build reusable business code and easy integrate your application with other external systems and technologies. It's open-source and distributed under the Apache license. Inspired by Demandware

                      default

                      copy iconCopydownload iconDownload
                      The advantages of Workflows are as follows:
                      
                      * Asynchronous vs synchronous execution
                      
                      * Sequential or [Parallel](https://github.com/eternita/workflow/tree/master/tutorials/ParallelProcessingExample) processing inside workflow
                      
                      * Neuro4j Workflow has layered architecture.
                      
                      * It will be much easier to organize, read and support your code.
                      
                      * Reusable business code, no need for duplication.
                      
                      * Module Development
                      
                      * Easy to integrate with different technologies.
                      
                      * Dependency Injection.
                       Developer can use Google Guice library or Spring framework to initialize code.
                      
                      * Open source.
                      
                      
                      ## First Flow
                      ----------
                      
                      This is HelloWorld example how to use Neuro4j Flows.
                      
                      Flow file org\neuro4j\example\HelloWorld.n4j:
                      
                      ![workflow-example-higlevel](https://raw.github.com/eternita/workflow/master/doc/images/HelloWorld.png "HelloWorld workflow")
                      
                      
                      HelloWorld.java
                      
                      ![workflow-example-higlevel](https://raw.github.com/eternita/workflow/master/doc/images/HelloWorldCustomBlock.png "HelloWorld workflow")
                      
                      Following code execute flow:
                      
                      ![workflow-example-higlevel](https://raw.github.com/eternita/workflow/master/doc/images/MainClass.png "HelloWorld workflow")
                      
                      
                      Online documentation how to create first application based on flow available at (http://neuro4j.org/articles/tutorial_hello_world)
                      ### Creating HelloWorld workflow with java
                      ```
                                      // StartNode1 -> CustomNode(o.n.f.e.HelloWorld) -> EndNode
                      		Workflow workflow = new WorkflowBuilder("org.neuro4j.flows.HelloWorld", "StartNode1")
                      				                .addCustomNode("org.neuro4j.flows.example.HelloWorld")
                      				                      .withOnError(createEndNode()).done()
                      				                .addEndNode()
                      				                .build();
                      
                      
                      		WorkflowEngine engine = new WorkflowEngine(new ConfigBuilder());
                      
                      		WorkflowRequest request = new WorkflowRequest();
                      		request.addParameter("name", "Mister");
                      
                      		ExecutionResult result = engine.execute(workflow, "StartNode1", request);
                      		System.out.println(result.getFlowContext().get("message"));
                      
                      ```
                      
                      ### Sync vs Asyn
                      Workflow can be executed synchronously:
                      ```
                      			Map<String, Object> params = new HashMap<String, Object>();
                      
                                  // add input parameters
                      			WorkflowEngine engine = new WorkflowEngine();
                          	    ExecutionResult result =  engine.execute("org.neuro4j.workflow.tutorial.HelloFlow-Start", parameters);
                      
                          	   if (result.getException() == null)
                          	   {
                          	   ....
                          	   }
                      
                      ```
                      or asynchronously:
                      ```
                      			Map<String, Object> params = new HashMap<String, Object>();
                      
                                  // add input parameters
                      			WorkflowEngine engine = new WorkflowEngine();
                       			FutureTask<ExecutionResult> result = engine.executeAsync("org.neuro4j.workflow.tutorial.HelloFlow-Start", parameters);
                      
                      	        while (...) {
                                    if (result.isDone()){
                          	          ExecutionResult executionResult = result.get();
                          	      }
                          	    }
                      ```
                      ###Sequential vs Parallel ([example](https://github.com/eternita/workflow/tree/master/tutorials/ParallelProcessingExample))
                      Code inside workflow can be executed in sequential or parallel way.
                      By default all nodes in workflow will be processing sequentially but developers can specify parallel workflow.
                       * add SwitchNode to workflow
                       * change Fork property to "true"
                       * add a few subflows
                       * add JoinNode with property Fork=true (shows like JoinNode with blue cross) (processor waits here until all subflows finished)
                       Example:
                      ![workflow-example-parallel](https://raw.github.com/eternita/workflow/master/doc/images/Parallel.png "Parallel processing")
                      
                      
                      ### Loading workflow
                      Workflow are loaded using the ```WorkflowLoader``` class. neuro4j-core provides three implementations of a ```WorkflowLoader```:
                       * ClassPathWorkflowLoader
                       * FileWorkflowLoader
                       * RemoteWorkflowLoader
                      
                      WorkflowLoader uses hierarchical delegation - if loader is not able to load workflow it delegates task to next loader
                      ```
                      		WorkflowEngine engine = new WorkflowEngine(new ConfigBuilder()
                      			                                          	.withLoader(new RemoteWorkflowLoader(converter, new ClasspathWorkflowLoader(converter))));
                      ```
                      or
                      ```
                      		File baseDir ...
                      		FileWorkflowLoader loader = new FileWorkflowLoader(converter, new ClasspathWorkflowLoader(converter), baseDir);
                        		WorkflowEngine engine = new WorkflowEngine(new ConfigBuilder()
                      			                                          	.withLoader(loader));
                      
                      ```
                      #### ClassPathWorkflowLoader
                      Loads workflows from folders/jars in classpath
                      
                      #### FileWorkflowLoader
                      Loads workflows from some external folder. Can be used to overwrite workflow from classpath
                      
                      #### RemoteWorkflowLoader
                      Loads remote workflow over http/https.
                      
                      ### Workflow cache
                      WorkflowProcessor keeps all loaded and converted workflows in cache. By default it uses ConcurrentMapWorkflowCache but during development
                      WorkflowEngine can be configured to use EmptyWorkflowCache.
                      ```
                      		WorkflowEngine engine = new WorkflowEngine(
                      			             	                  new ConfigBuilder()
                                                         .withWorkflowCache(EmptyWorkflowCache.INSTANCE));
                      
                        engine.execute("org.neuro4j.workflow.tutorial.HelloFlow-Start", parameters);
                      ```
                      
                      ### Aliases
                      WorkflowEngine can be configured to use aliases for workflows.
                      ```
                      		Map<String, String> map = new HashMap<>();
                      		map.put("myflow", "org.mydomain.FlowForFileWorkflowLoader-StartNode1");
                      
                      		ConfigBuilder builder = new ConfigBuilder().withAliases(map);
                      
                      		WorkflowEngine engine = new WorkflowEngine(builder);
                      		ExecutionResult result = engine.execute("myflow");
                      ```
                      Flow ```org.mydomain.FlowForFileWorkflowLoader-StartNode1``` will be loaded and processed.
                      
                      
                      ### ActionHandler
                      Developers can define ActionHandler to execute code before/after CustomBlock
                      ```
                      		ActionHandler handler = new ActionHandler() {
                      
                      			@Override
                      			public void preExecute(NodeInfo nodeInfo, FlowContext context, ActionBlock actionBlock) {
                      			}
                      
                      			@Override
                      			public void postExecute(NodeInfo nodeInfo, FlowContext context, ActionBlock actionBlock) {
                      			}
                      		};
                      
                      		Map<Class<? extends ActionBlock>, ActionHandler> map = new HashMap<>();
                      
                      		map.put(SystemOutBlock.class, handler);
                      
                      		WorkflowEngine engine = new WorkflowEngine(new ConfigBuilder().withActionRegistry(new ActionHandlersRegistry(map)));
                      
                      ```
                      
                      ```WorkflowProcessor``` will call handler before/after each call ```SystemOutBlock.execute(....)```
                      
                      ### CustomBlock cache
                      Developers can define cache strategy for each custom block using @CachedNode annotation
                       * SINGLETON
                       * NODE
                       * NONE
                      
                      #### SINGLETON
                      Just one instance of block will be created. ex. SystemOutBlock
                      
                      #### NONE
                      WorkflowLoader will create new instance of block for each call.
                      
                      #### NODE
                      
                      Debuging flow
                      ----------
                      
                      Neuro4j Studio provides  plugin which allows to debug flow in visual editor.
                      
                      ![workflow-example-higlevel](https://raw.github.com/eternita/workflow/master/doc/images/debug.png "Debuging workflow")
                      
                      
                      
                      More information about debug plugin avaliable at http://neuro4j.org/docs/wf/flowdebugtool

                      The unauthenticated git protocol on port 9418 is no longer supported

                      copy iconCopydownload iconDownload
                          - name: Fix up git URLs
                            run: echo -e '[url "https://github.com/"]\n  insteadOf = "git://github.com/"' >> ~/.gitconfig
                      
                      git config --global url."https://github.com/".insteadOf git://github.com/
                      
                      git config --global url."git@github.com:".insteadOf git://github.com/
                      
                          - name: Fix up git URLs
                            run: echo -e '[url "https://github.com/"]\n  insteadOf = "git://github.com/"' >> ~/.gitconfig
                      
                      git config --global url."https://github.com/".insteadOf git://github.com/
                      
                      git config --global url."git@github.com:".insteadOf git://github.com/
                      
                          - name: Fix up git URLs
                            run: echo -e '[url "https://github.com/"]\n  insteadOf = "git://github.com/"' >> ~/.gitconfig
                      
                      git config --global url."https://github.com/".insteadOf git://github.com/
                      
                      git config --global url."git@github.com:".insteadOf git://github.com/
                      
                      git config --global url."https://".insteadOf git://
                      
                      [remote "upstream"]
                          url = git://github.com/curlconverter/curlconverter.git
                          fetch = +refs/heads/*:refs/remotes/upstream/*
                      
                      [remote "upstream"]
                          url = git@github.com:curlconverter/curlconverter.git
                          fetch = +refs/heads/*:refs/remotes/upstream/*
                      
                      [remote "upstream"]
                          url = git://github.com/curlconverter/curlconverter.git
                          fetch = +refs/heads/*:refs/remotes/upstream/*
                      
                      [remote "upstream"]
                          url = git@github.com:curlconverter/curlconverter.git
                          fetch = +refs/heads/*:refs/remotes/upstream/*
                      
                      git config --global url."https://github".insteadOf git://github
                      
                      Unhandled rejection Error: Command failed: /usr/bin/git submodule update -q --init --recursive
                      warning: templates not found /tmp/pacote-git-template-tmp/git-clone-a001527f
                      fatal: remote error:
                        The unauthenticated git protocol on port 9418 is no longer supported.
                      Please see https://github.blog/2021-09-01-improving-git-protocol-security-github/ for more information.
                      fatal: clone of 'git://github.com/jquery/sizzle.git' into submodule path '/root/.npm/_cacache/tmp/git-clone-19674e32/src/sizzle' failed
                      Failed to clone 'src/sizzle'. Retry scheduled
                      warning: templates not found /tmp/pacote-git-template-tmp/git-clone-a001527f
                      
                      git config --global url."https://github".insteadOf git://github
                      
                      Unhandled rejection Error: Command failed: /usr/bin/git submodule update -q --init --recursive
                      warning: templates not found /tmp/pacote-git-template-tmp/git-clone-a001527f
                      fatal: remote error:
                        The unauthenticated git protocol on port 9418 is no longer supported.
                      Please see https://github.blog/2021-09-01-improving-git-protocol-security-github/ for more information.
                      fatal: clone of 'git://github.com/jquery/sizzle.git' into submodule path '/root/.npm/_cacache/tmp/git-clone-19674e32/src/sizzle' failed
                      Failed to clone 'src/sizzle'. Retry scheduled
                      warning: templates not found /tmp/pacote-git-template-tmp/git-clone-a001527f
                      
                          insteadOf = ssh://
                      
                          insteadOf = git://
                      
                          insteadOf = ssh://
                      
                          insteadOf = git://
                      

                      Github Actions Failing

                      copy iconCopydownload iconDownload
                      steps:
                       - id: gcloud
                      -  uses: GoogleCloudPlatform/github-actions/setup-gcloud@master
                      +  uses: google-github-actions/setup-gcloud@master
                      
                      name: Build and Deploy
                      
                      on:
                        push:
                          branches: [dev]
                      
                      permissions:
                        id-token: write
                        contents: read
                      
                      jobs:
                        build-and-publish:
                          steps:
                      
                          - name: Checkout
                            uses: actions/checkout@v2
                      
                          - name: test local call from steps # this do not work
                            if: github.ref_name == 'dev'       
                            uses: ./.github/workflows/deploy.yml # this is from steps level
                              with:
                                devops-bucket: bucket-name
                                role: iam role for the job
                      
                        dev: # this worked well
                          if: github.ref_name == 'dev'
                          uses: ./.github/workflows/deploy.yml # this is jobs level
                          with:
                            devops-bucket: bucket-name
                            role: iam role for the job
                      

                      Limit GitHub action workflow concurrency on push and pull_request?

                      copy iconCopydownload iconDownload
                      group: ${{ github.workflow }}-${{ github.ref }}
                      
                      group: ${{ github.workflow }}
                      
                      group: ${{ github.workflow }}-${{ github.ref }}
                      
                      group: ${{ github.workflow }}
                      
                      concurrency:
                        group: ${{ github.head_ref || github.ref_name }} 
                        cancel-in-progress: true
                      

                      GitHub reusable workflow: use latest commit

                      copy iconCopydownload iconDownload
                      jobs:
                        call-workflow-in-local-repo:
                          uses: ./.github/workflows/workflow-2.yml
                      

                      Where does the $*REPO dynamic variable obtain its values, and how to change/alter them?

                      copy iconCopydownload iconDownload
                      # Environment
                      ENV PATH="${WORKDIR}/.raku/bin:${WORKDIR}/.raku/share/perl6/site/bin:${PATH}" \
                          ENV="${WORKDIR}/.profile"\
                          RAKULIB="inst#/home/raku/.raku"
                      
                      
                      HOME=/home/raku zef --version
                      
                      # Environment
                      ENV PATH="${WORKDIR}/.raku/bin:${WORKDIR}/.raku/share/perl6/site/bin:${PATH}" \
                          ENV="${WORKDIR}/.profile"\
                          RAKULIB="inst#/home/raku/.raku"
                      
                      
                      HOME=/home/raku zef --version
                      

                      NPM CI error bindings not accessible from watchpack-chokidar2:fsevents

                      copy iconCopydownload iconDownload
                            - uses: actions/setup-node@v1
                              with:
                                node-version: "14"
                      

                      Using GitHub Actions to create a .env file in the workflow

                      copy iconCopydownload iconDownload
                            - name: Create and populate .Renviron file
                              env:
                                AWS_HOST: ${{ secrets.AWS_HOST }}
                                AWS_PORT: ${{ secrets.AWS_PORT }}
                                AWS_PW: ${{ secrets.AWS_PW }}
                                AWS_USER: ${{ secrets.AWS_USER }}
                                DBNAME: ${{ secrets.DBNAME }}
                              run: |
                                touch .Renviron
                                echo aws_host="$AWS_HOST" >> .Renviron
                                echo aws_port="$AWS_PORT" >> .Renviron
                                echo aws_pw="$AWS_PW" >> .Renviron
                                echo aws_user="$AWS_USER" >> .Renviron
                                echo dbname="$DBNAME" >> .Renviron
                      
                                echo "cat .Renviron"
                                cat .Renviron
                      
                                echo "ls -a ."
                                ls -a .
                      
                                echo "ls -a ${{ github.workspace }}"
                                ls -a ${{ github.workspace }}
                              shell: bash
                      
                      Run touch .Renviron
                        touch .Renviron
                        echo aws_host="$AWS_HOST" >> .Renviron
                        echo aws_port="$AWS_PORT" >> .Renviron
                        echo aws_pw="$AWS_PW" >> .Renviron
                        echo aws_user="$AWS_USER" >> .Renviron
                        echo dbname="$DBNAME" >> .Renviron
                        
                        echo "cat .Renviron"
                        cat .Renviron
                        
                        echo "ls -a ."
                        ls -a .
                        
                        echo "ls -a /home/runner/work/github-actions-manual/github-actions-manual"
                        ls -a /home/runner/work/github-actions-manual/github-actions-manual
                        shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
                        env:
                          AWS_HOST: 
                          AWS_PORT: 
                          AWS_PW: 
                          AWS_USER: 
                          DBNAME: 
                      cat .Renviron
                      aws_host=
                      aws_port=
                      aws_pw=
                      aws_user=
                      dbname=
                      ls -a .
                      .
                      ..
                      .Renviron
                      .git
                      .github
                      .gitignore
                      LICENSE
                      README.md
                      change-workflow.ps1
                      commit-new-workflow.ps1
                      dist
                      public
                      test.ps1
                      test2.ps1
                      ls -a /home/runner/work/github-actions-manual/github-actions-manual
                      .
                      ..
                      .Renviron
                      .git
                      .github
                      .gitignore
                      LICENSE
                      README.md
                      change-workflow.ps1
                      commit-new-workflow.ps1
                      dist
                      public
                      test.ps1
                      test2.ps1
                      
                            - name: Create and populate .Renviron file
                              env:
                                AWS_HOST: ${{ secrets.AWS_HOST }}
                                AWS_PORT: ${{ secrets.AWS_PORT }}
                                AWS_PW: ${{ secrets.AWS_PW }}
                                AWS_USER: ${{ secrets.AWS_USER }}
                                DBNAME: ${{ secrets.DBNAME }}
                              run: |
                                touch .Renviron
                                echo aws_host="$AWS_HOST" >> .Renviron
                                echo aws_port="$AWS_PORT" >> .Renviron
                                echo aws_pw="$AWS_PW" >> .Renviron
                                echo aws_user="$AWS_USER" >> .Renviron
                                echo dbname="$DBNAME" >> .Renviron
                      
                                echo "cat .Renviron"
                                cat .Renviron
                      
                                echo "ls -a ."
                                ls -a .
                      
                                echo "ls -a ${{ github.workspace }}"
                                ls -a ${{ github.workspace }}
                              shell: bash
                      
                      Run touch .Renviron
                        touch .Renviron
                        echo aws_host="$AWS_HOST" >> .Renviron
                        echo aws_port="$AWS_PORT" >> .Renviron
                        echo aws_pw="$AWS_PW" >> .Renviron
                        echo aws_user="$AWS_USER" >> .Renviron
                        echo dbname="$DBNAME" >> .Renviron
                        
                        echo "cat .Renviron"
                        cat .Renviron
                        
                        echo "ls -a ."
                        ls -a .
                        
                        echo "ls -a /home/runner/work/github-actions-manual/github-actions-manual"
                        ls -a /home/runner/work/github-actions-manual/github-actions-manual
                        shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
                        env:
                          AWS_HOST: 
                          AWS_PORT: 
                          AWS_PW: 
                          AWS_USER: 
                          DBNAME: 
                      cat .Renviron
                      aws_host=
                      aws_port=
                      aws_pw=
                      aws_user=
                      dbname=
                      ls -a .
                      .
                      ..
                      .Renviron
                      .git
                      .github
                      .gitignore
                      LICENSE
                      README.md
                      change-workflow.ps1
                      commit-new-workflow.ps1
                      dist
                      public
                      test.ps1
                      test2.ps1
                      ls -a /home/runner/work/github-actions-manual/github-actions-manual
                      .
                      ..
                      .Renviron
                      .git
                      .github
                      .gitignore
                      LICENSE
                      README.md
                      change-workflow.ps1
                      commit-new-workflow.ps1
                      dist
                      public
                      test.ps1
                      test2.ps1
                      
                            - name: Create and populate .Renviron file
                              env:
                                AWS_HOST: ${{ secrets.AWS_HOST }}
                                AWS_PORT: ${{ secrets.AWS_PORT }}
                                AWS_PW: ${{ secrets.AWS_PW }}
                                AWS_USER: ${{ secrets.AWS_USER }}
                                DBNAME: ${{ secrets.DBNAME }}
                              run: |
                                cat <<EOF > .Renviron
                                aws_host="$AWS_HOST"
                                aws_port="$AWS_PORT"
                                aws_pw="$AWS_PW"
                                aws_user="$AWS_USER"
                                dbname="$DBNAME"
                                EOF
                      
                                echo "cat .Renviron"
                                cat .Renviron
                      
                      

                      Understand DispatchTime on M1 machines

                      copy iconCopydownload iconDownload
                      nanoseconds = ((machTime * sTimebase.numer) / sTimebase.denom)
                      
                      rawValue = (nanoseconds * 3 + 124) / 125
                      
                      nanoseconds = rawValue * 125 / 3
                      
                      let time1 = DispatchQueue.SchedulerTimeType(.init(uptimeNanoseconds: 10000))
                      let time2 = DispatchQueue.SchedulerTimeType(.init(uptimeNanoseconds: 10431))
                      XCTAssertEqual(time1.distance(to: time2), .nanoseconds(431))
                      
                      (10000 * 3 + 124) / 125 -> 240
                      (10431 * 3 + 124) / 125 -> 251
                      251 - 240 -> 11
                      11 * 125 / 3 -> 458
                      
                      XCTAssertEqual(time1.distance(to: time2), .nanoseconds(431), accuracy: .nanoseconds(42))
                      XCTAssertEqual(time2.distance(to: time1), .nanoseconds(-431), accuracy: .nanoseconds(42))
                      
                      rawValue = (nanoseconds * 3 + 124) / 125
                      
                      nanoseconds = rawValue * 125 / 3
                      
                      let time1 = DispatchQueue.SchedulerTimeType(.init(uptimeNanoseconds: 10000))
                      let time2 = DispatchQueue.SchedulerTimeType(.init(uptimeNanoseconds: 10431))
                      XCTAssertEqual(time1.distance(to: time2), .nanoseconds(431))
                      
                      (10000 * 3 + 124) / 125 -> 240
                      (10431 * 3 + 124) / 125 -> 251
                      251 - 240 -> 11
                      11 * 125 / 3 -> 458
                      
                      XCTAssertEqual(time1.distance(to: time2), .nanoseconds(431), accuracy: .nanoseconds(42))
                      XCTAssertEqual(time2.distance(to: time1), .nanoseconds(-431), accuracy: .nanoseconds(42))
                      
                      rawValue = (nanoseconds * 3 + 124) / 125
                      
                      nanoseconds = rawValue * 125 / 3
                      
                      let time1 = DispatchQueue.SchedulerTimeType(.init(uptimeNanoseconds: 10000))
                      let time2 = DispatchQueue.SchedulerTimeType(.init(uptimeNanoseconds: 10431))
                      XCTAssertEqual(time1.distance(to: time2), .nanoseconds(431))
                      
                      (10000 * 3 + 124) / 125 -> 240
                      (10431 * 3 + 124) / 125 -> 251
                      251 - 240 -> 11
                      11 * 125 / 3 -> 458
                      
                      XCTAssertEqual(time1.distance(to: time2), .nanoseconds(431), accuracy: .nanoseconds(42))
                      XCTAssertEqual(time2.distance(to: time1), .nanoseconds(-431), accuracy: .nanoseconds(42))
                      
                      rawValue = (nanoseconds * 3 + 124) / 125
                      
                      nanoseconds = rawValue * 125 / 3
                      
                      let time1 = DispatchQueue.SchedulerTimeType(.init(uptimeNanoseconds: 10000))
                      let time2 = DispatchQueue.SchedulerTimeType(.init(uptimeNanoseconds: 10431))
                      XCTAssertEqual(time1.distance(to: time2), .nanoseconds(431))
                      
                      (10000 * 3 + 124) / 125 -> 240
                      (10431 * 3 + 124) / 125 -> 251
                      251 - 240 -> 11
                      11 * 125 / 3 -> 458
                      
                      XCTAssertEqual(time1.distance(to: time2), .nanoseconds(431), accuracy: .nanoseconds(42))
                      XCTAssertEqual(time2.distance(to: time1), .nanoseconds(-431), accuracy: .nanoseconds(42))
                      

                      Github actions decline action if fails

                      copy iconCopydownload iconDownload
                      name: Android CI
                      on:
                        push:
                          branches: [ main ]
                        pull_request:
                      
                      jobs:
                        test:
                          runs-on: ubuntu-latest
                          steps:
                            - uses: actions/checkout@v1
                      
                            - name: set up JDK 11
                              uses: actions/setup-java@v1
                              with:
                                java-version: 11
                      
                            # Runs ktlint
                            - name: Lint
                              run: ./gradlew ktlintCheck
                      
                            # Execute unit tests
                            - name: Unit Test
                              run: ./gradlew testDebugUnitTest
                      
                      

                      How can I reuse a GitHub Actions workflow from the branch I'm currently working on?

                      copy iconCopydownload iconDownload
                      jobs:
                        tag-my-workflow:
                          steps:
                            - name: git tag ${{ github.ref }} as "current-branch"
                              uses: see for example https://levelup.gitconnected.com/how-to-move-a-git-tag-using-github-actions-e23a523eb325
                      
                        call-workflow:
                          needs: tag-my-workflow
                          uses: my/repo/.github/workflows/called.yml@current-branch
                      

                      Community Discussions

                      Trending Discussions on workflow
                      • The unauthenticated git protocol on port 9418 is no longer supported
                      • Github Actions Failing
                      • Limit GitHub action workflow concurrency on push and pull_request?
                      • GitHub reusable workflow: use latest commit
                      • Where does the $*REPO dynamic variable obtain its values, and how to change/alter them?
                      • NPM CI error bindings not accessible from watchpack-chokidar2:fsevents
                      • Using GitHub Actions to create a .env file in the workflow
                      • Understand DispatchTime on M1 machines
                      • Github actions decline action if fails
                      • Jenkins with Kubernetes Client Plugin - NoSuchMethodError
                      Trending Discussions on workflow

                      QUESTION

                      The unauthenticated git protocol on port 9418 is no longer supported

                      Asked 2022-Mar-27 at 13:23

                      I have been using github actions for quite sometime but today my deployments started failing. Below is the error from github action logs

                      Command: git
                      Arguments: ls-remote --tags --heads git://github.com/adobe-webplatform/eve.git
                      Directory: /home/runner/work/stackstream-fe/stackstream-fe
                      Output:
                      fatal: remote error: 
                        The unauthenticated git protocol on port 9418 is no longer supported.
                      

                      Upon investigation, it appears that below section in my yml file is causing the issue.

                          - name: Installing modules
                            run: yarn install
                      

                      I have looked into this change log but can't seem to comprehend the issue.

                      Additional Details: Server: EC2 Instance Github actions steps:

                        steps:
                        - name: Checkout
                          uses: actions/checkout@v2
                      
                        - id: vars
                          run: |
                            if [ '${{ github.ref }}' == 'refs/heads/master' ]; then echo "::set-output name=environment::prod_stackstream" ; echo "::set-output name=api-url::api" ; elif [ '${{ github.ref }}' == 'refs/heads/staging' ]; then echo "::set-output name=environment::staging_stackstream"  ; echo "::set-output name=api-url::stagingapi" ; else echo "::set-output name=environment::dev_stackstream" ; echo "::set-output name=api-url::devapi" ; fi
                      
                        - uses: pCYSl5EDgo/cat@master
                          id: slack
                          with:
                            path: .github/workflows/slack.txt
                      
                        - name: Slack Start Notification
                          uses: 8398a7/action-slack@v3
                          env:
                            SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
                            ENVIRONMENT: '`${{ steps.vars.outputs.environment }}`'
                            COLOR: good
                            STATUS: '`Started`'
                          with:
                            status: custom
                            fields: workflow,job,commit,repo,ref,author,took
                            custom_payload: |
                              ${{ steps.slack.outputs.text }}
                      
                        - name: Installing modules
                          env:
                            REACT_APP_API_URL: 'https://${{ steps.vars.outputs.api-url }}mergestack.com/api/v1'
                          run: yarn install
                      
                        - name: Create Frontend Build
                          env:
                            REACT_APP_API_URL: 'https://${{ steps.vars.outputs.api-url }}mergestack.com/api/v1'
                          run: yarn build
                      
                        - name: Deploy to Frontend Server DEV
                          if: ${{ contains(github.ref, 'dev') }}
                          uses: easingthemes/ssh-deploy@v2.1.5
                          env:
                            SSH_PRIVATE_KEY: ${{ secrets.DEV_KEY }}
                            ARGS: '-rltgoDzvO --delete'
                            SOURCE: 'deploy/'
                            REMOTE_HOST: ${{ secrets.DEV_HOST }}
                            REMOTE_USER: plyfolio-dev
                            TARGET: '/home/plyfolio-dev/${{ steps.vars.outputs.environment }}/fe/deploy'
                      

                      package.json file

                         {
                        "name": "stackstream-fe",
                        "version": "1.0.0",
                        "authors": [
                          "fayyaznofal@gmail.com"
                        ],
                        "private": true,
                        "dependencies": {
                          "@fortawesome/fontawesome-svg-core": "^1.2.34",
                          "@fortawesome/free-solid-svg-icons": "^5.15.2",
                          "@fortawesome/react-fontawesome": "^0.1.14",
                          "@fullcalendar/bootstrap": "^5.5.0",
                          "@fullcalendar/core": "^5.5.0",
                          "@fullcalendar/daygrid": "^5.5.0",
                          "@fullcalendar/interaction": "^5.5.0",
                          "@fullcalendar/react": "^5.5.0",
                          "@lourenci/react-kanban": "^2.1.0",
                          "@redux-saga/simple-saga-monitor": "^1.1.2",
                          "@testing-library/jest-dom": "^5.11.9",
                          "@testing-library/react": "^11.2.3",
                          "@testing-library/user-event": "^12.6.0",
                          "@toast-ui/react-chart": "^1.0.2",
                          "@types/jest": "^26.0.14",
                          "@types/node": "^14.10.3",
                          "@types/react": "^16.9.49",
                          "@types/react-dom": "^16.9.8",
                          "@vtaits/react-color-picker": "^0.1.1",
                          "apexcharts": "^3.23.1",
                          "availity-reactstrap-validation": "^2.7.0",
                          "axios": "^0.21.1",
                          "axios-mock-adapter": "^1.19.0",
                          "axios-progress-bar": "^1.2.0",
                          "bootstrap": "^5.0.0-beta2",
                          "chart.js": "^2.9.4",
                          "chartist": "^0.11.4",
                          "classnames": "^2.2.6",
                          "components": "^0.1.0",
                          "dotenv": "^8.2.0",
                          "draft-js": "^0.11.7",
                          "echarts": "^4.9.0",
                          "echarts-for-react": "^2.0.16",
                          "firebase": "^8.2.3",
                          "google-maps-react": "^2.0.6",
                          "history": "^4.10.1",
                          "i": "^0.3.6",
                          "i18next": "^19.8.4",
                          "i18next-browser-languagedetector": "^6.0.1",
                          "jsonwebtoken": "^8.5.1",
                          "leaflet": "^1.7.1",
                          "lodash": "^4.17.21",
                          "lodash.clonedeep": "^4.5.0",
                          "lodash.get": "^4.4.2",
                          "metismenujs": "^1.2.1",
                          "mkdirp": "^1.0.4",
                          "moment": "2.29.1",
                          "moment-timezone": "^0.5.32",
                          "nouislider-react": "^3.3.9",
                          "npm": "^7.6.3",
                          "prop-types": "^15.7.2",
                          "query-string": "^6.14.0",
                          "react": "^16.13.1",
                          "react-apexcharts": "^1.3.7",
                          "react-auth-code-input": "^1.0.0",
                          "react-avatar": "^3.10.0",
                          "react-bootstrap": "^1.5.0",
                          "react-bootstrap-editable": "^0.8.2",
                          "react-bootstrap-sweetalert": "^5.2.0",
                          "react-bootstrap-table-next": "^4.0.3",
                          "react-bootstrap-table2-editor": "^1.4.0",
                          "react-bootstrap-table2-paginator": "^2.1.2",
                          "react-bootstrap-table2-toolkit": "^2.1.3",
                          "react-chartist": "^0.14.3",
                          "react-chartjs-2": "^2.11.1",
                          "react-color": "^2.19.3",
                          "react-confirm-alert": "^2.7.0",
                          "react-content-loader": "^6.0.1",
                          "react-countdown": "^2.3.1",
                          "react-countup": "^4.3.3",
                          "react-cropper": "^2.1.4",
                          "react-data-table-component": "^6.11.8",
                          "react-date-picker": "^8.0.6",
                          "react-datepicker": "^3.4.1",
                          "react-dom": "^16.13.1",
                          "react-draft-wysiwyg": "^1.14.5",
                          "react-drag-listview": "^0.1.8",
                          "react-drawer": "^1.3.4",
                          "react-dropzone": "^11.2.4",
                          "react-dual-listbox": "^2.0.0",
                          "react-facebook-login": "^4.1.1",
                          "react-flatpickr": "^3.10.6",
                          "react-google-login": "^5.2.2",
                          "react-hook-form": "^7.15.2",
                          "react-i18next": "^11.8.5",
                          "react-icons": "^4.2.0",
                          "react-image-lightbox": "^5.1.1",
                          "react-input-mask": "^2.0.4",
                          "react-jvectormap": "^0.0.16",
                          "react-leaflet": "^3.0.5",
                          "react-meta-tags": "^1.0.1",
                          "react-modal-video": "^1.2.6",
                          "react-notifications": "^1.7.2",
                          "react-number-format": "^4.7.3",
                          "react-perfect-scrollbar": "^1.5.8",
                          "react-rangeslider": "^2.2.0",
                          "react-rating": "^2.0.5",
                          "react-rating-tooltip": "^1.1.6",
                          "react-redux": "^7.2.1",
                          "react-responsive-carousel": "^3.2.11",
                          "react-router-dom": "^5.2.0",
                          "react-script": "^2.0.5",
                          "react-scripts": "3.4.3",
                          "react-select": "^4.3.1",
                          "react-sparklines": "^1.7.0",
                          "react-star-ratings": "^2.3.0",
                          "react-super-responsive-table": "^5.2.0",
                          "react-switch": "^6.0.0",
                          "react-table": "^7.6.3",
                          "react-toastify": "^7.0.3",
                          "react-toastr": "^3.0.0",
                          "react-twitter-auth": "0.0.13",
                          "reactstrap": "^8.8.1",
                          "recharts": "^2.0.8",
                          "redux": "^4.0.5",
                          "redux-saga": "^1.1.3",
                          "reselect": "^4.0.0",
                          "sass": "^1.37.5",
                          "simplebar-react": "^2.3.0",
                          "styled": "^1.0.0",
                          "styled-components": "^5.2.1",
                          "toastr": "^2.1.4",
                          "typescript": "^4.0.2",
                          "universal-cookie": "^4.0.4"
                        },
                        "devDependencies": {
                          "@typescript-eslint/eslint-plugin": "^2.27.0",
                          "@typescript-eslint/parser": "^2.27.0",
                          "@typescript-eslint/typescript-estree": "^4.15.2",
                          "eslint-config-prettier": "^6.10.1",
                          "eslint-plugin-prettier": "^3.1.2",
                          "husky": "^4.2.5",
                          "lint-staged": "^10.1.3",
                          "prettier": "^1.19.1",
                          "react-test-renderer": "^16.13.1",
                          "redux-devtools-extension": "^2.13.8",
                          "redux-mock-store": "^1.5.4"
                        },
                        "scripts": {
                          "start": "react-scripts start",
                          "build": "react-scripts build && mv build ./deploy/build",
                          "build-local": "react-scripts build",
                          "test": "react-scripts test",
                          "eject": "react-scripts eject"
                        },
                        "eslintConfig": {
                          "extends": "react-app"
                        },
                        "husky": {
                          "hooks": {
                            "pre-commit": "lint-staged"
                          }
                        },
                        "lint-staged": {
                          "*.{js,ts,tsx}": [
                            "eslint --fix"
                          ]
                        },
                        "browserslist": {
                          "production": [
                            ">0.2%",
                            "not dead",
                            "not op_mini all"
                          ],
                          "development": [
                            "last 1 chrome version",
                            "last 1 firefox version",
                            "last 1 safari version"
                          ]
                        }
                      }
                      

                      ANSWER

                      Answered 2022-Mar-16 at 07:01

                      First, this error message is indeed expected on Jan. 11th, 2022.
                      See "Improving Git protocol security on GitHub".

                      January 11, 2022 Final brownout.

                      This is the full brownout period where we’ll temporarily stop accepting the deprecated key and signature types, ciphers, and MACs, and the unencrypted Git protocol.
                      This will help clients discover any lingering use of older keys or old URLs.

                      Second, check your package.json dependencies for any git:// URL, as in this example, fixed in this PR.

                      As noted by Jörg W Mittag:

                      There was a 4-month warning.
                      The entire Internet has been moving away from unauthenticated, unencrypted protocols for a decade, it's not like this is a huge surprise.

                      Personally, I consider it less an "issue" and more "detecting unmaintained dependencies".

                      Plus, this is still only the brownout period, so the protocol will only be disabled for a short period of time, allowing developers to discover the problem.

                      The permanent shutdown is not until March 15th.


                      For GitHub Actions:

                      As in actions/checkout issue 14, you can add as a first step:

                          - name: Fix up git URLs
                            run: echo -e '[url "https://github.com/"]\n  insteadOf = "git://github.com/"' >> ~/.gitconfig
                      

                      That will change any git://github.com/ into https://github.com/.

                      For local projects

                      For all your repositories, you can set:

                      git config --global url."https://github.com/".insteadOf git://github.com/
                      

                      You can also use SSH, but GitHub Security reminds us that, as of March 15th, 2022, GitHub stopped accepting DSA keys. RSA keys uploaded after Nov 2, 2021 will work only with SHA-2 signatures.
                      The deprecated MACs, ciphers, and unencrypted Git protocol are permanently disabled.

                      So this (with the right key) would work:

                      git config --global url."git@github.com:".insteadOf git://github.com/
                      

                      That will change any git://github.com/ (unencrypted Git protocol) into git@github.com: (SSH URL).

                      Source https://stackoverflow.com/questions/70663523

                      Community Discussions, Code Snippets contain sources that include Stack Exchange Network

                      Vulnerabilities

                      No vulnerabilities reported

                      Install workflow

                      You can download it from GitHub.
                      You can use workflow like any standard Java library. Please include the the jar files in your classpath. You can also use any IDE and you can run and debug the workflow component as you would do with any other Java program. Best practice is to use a build tool that supports dependency management such as Maven or Gradle. For Maven installation, please refer maven.apache.org. For Gradle installation, please refer gradle.org .

                      Support

                      For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .

                      DOWNLOAD this Library from

                      Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from
                      over 430 million Knowledge Items
                      Find more libraries
                      Reuse Solution Kits and Libraries Curated by Popular Use Cases
                      Explore Kits

                      Save this library and start creating your kit

                      Explore Related Topics

                      Share this Page

                      share link
                      Consider Popular BPM Libraries
                      Try Top Libraries by eternita
                      Compare BPM Libraries with Highest Support
                      Compare BPM Libraries with Highest Quality
                      Compare BPM Libraries with Highest Security
                      Compare BPM Libraries with Permissive License
                      Compare BPM Libraries with Highest Reuse
                      Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from
                      over 430 million Knowledge Items
                      Find more libraries
                      Reuse Solution Kits and Libraries Curated by Popular Use Cases
                      Explore Kits

                      Save this library and start creating your kit

                      • © 2022 Open Weaver Inc.