Skip to content

Instantly share code, notes, and snippets.

Felix Kuestahler talfco

Block or report user

Report or block talfco

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View tut02-1-SaveOutputTask.java
package net.cloudburo.task.saga1;
import org.flowable.engine.delegate.DelegateExecution;
import org.flowable.engine.delegate.JavaDelegate;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.Map;
public class SaveOutputTask implements JavaDelegate {
View tut02-1-Saga1ProcessRoutes.java
package net.cloudburo.camel.saga1;
import org.apache.camel.LoggingLevel;
import org.apache.camel.builder.RouteBuilder;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;
@Component
public class Saga1ProcessRoutes extends RouteBuilder {
View tut02-1-HelloController.java
package net.cloudburo.app.controller;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.RequestMapping;
@RestController
public class HelloController {
@RequestMapping("/")
public String index() {
View tut02-1-UserCreatorCommandLineRunner.java
package net.cloudburo.app;
import org.flowable.idm.api.IdmIdentityService;
import org.flowable.idm.api.Privilege;
import org.flowable.idm.api.User;
import org.springframework.boot.CommandLineRunner;
import org.springframework.stereotype.Component;
@Component
public class UserCreatorCommandLineRunner implements CommandLineRunner {
View tut02-1-SecurityConfiguration.java
package net.cloudburo.app;
import org.springframework.boot.actuate.autoconfigure.security.servlet.EndpointRequest;
import org.springframework.boot.actuate.health.HealthEndpoint;
import org.springframework.boot.actuate.info.InfoEndpoint;
import org.springframework.context.annotation.Configuration;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
import org.springframework.security.config.http.SessionCreationPolicy;
View tut02-1-build.gradle
plugins {
id 'org.springframework.boot' version '2.1.3.RELEASE'
id 'java'
}
apply plugin: 'io.spring.dependency-management'
group = 'com.example'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = '1.8'
View tut02-1-InitVariablesTask.java
package net.cloudburo.task.saga1;
import org.flowable.engine.delegate.DelegateExecution;
import org.flowable.engine.delegate.JavaDelegate;
import java.util.HashMap;
import java.util.Map;
public class InitVariablesTask implements JavaDelegate {
public void execute(DelegateExecution execution) {
View tut01-lesson6-get_person_record.py
def get_person_record(self, id):
recs = list(filter(lambda person: person['id'] == id, self._members))
if len(recs) != 1:
return None
else:
return recs[0]
View tut01-lesson6-addCombinationsReworked.py
def add_combinations_to_directory(self, comb_tuples, person_id, last_name):
for comb in comb_tuples:
if last_name in comb:
concat_name = self.generate_normalized_name(comb)
metaphone_tuple = doublemetaphone(concat_name)
if metaphone_tuple[0] in self.__lookup_dict[0]:
if not person_id in self.__lookup_dict[0][metaphone_tuple[0]]:
self.__lookup_dict[0][metaphone_tuple[0]].append(person_id)
else:
self.__lookup_dict[0][metaphone_tuple[0]] = [person_id]
View tut01-lesson6-calculateNameMachring.py
def __calculate_name_matching(self, row):
name = row['Name']
name = (normalize_unicode_to_ascii(name)).strip()
tp = tuple(name.split(" "))
res = self.__gov_api.match_name(tp)
if res[0] is not None:
row['col_match1'] = res[0]
row['col_match2'] = str(res[1])
person = self.__gov_api.get_person_record(res[0])
row['party'] = person.get('party')
You can’t perform that action at this time.