Skip to content

Instantly share code, notes, and snippets.

View CedricL46's full-sized avatar

Cedric L CedricL46

View GitHub Profile
<!-- use xmlns:f="http://java.sun.com/jsf/core" in the f:view at the top of your jsf file -->
<!-- e.g: <f:view xmlns:f="http://java.sun.com/jsf/core" xmlns:af="http://xmlns.oracle.com/adf/faces/rich" -->
<!-- Here's how to set binding values one a button click - useful when you want to set values right before commiting a user form -->
<af:commandButton text="YOUR_BUTTON" id="bid1" action="#{YOUR_SCOPE.YOUR_BEAN.YOUR_ACTION_FUNC}">
<!-- You can either set a custom value YOUR_VALUE or the value of another binding #{bindings.YOUR_SOURCE_BINDING.inputValue} -->
<!-- or even the value of an attribute of YOUR_BEAN with getter and setter generated-->
<f:setPropertyActionListener value="YOUR_VALUE" target="#{bindings.YOUR_TARGET_BINDING1.inputValue}"/>
<f:setPropertyActionListener value="#{bindings.YOUR_SOURCE_BINDING.inputValue}" target="#{bindings.YOUR_TARGET_BINDING2.inputValue}"/>
<f:setPropertyActionListener value="#{YOUR_SCOPE.YOUR_BEAN.YOUR_ATTRIBUTE}" target="#{bindings.YOUR_TARGET_BINDI
# 1) First step is to sudo as the unix user with weblogic access (replace YOUR_SUDO_USER with yours)
ssh YOUR_USER@YOUR_LINUX_SERVER
sudo su - YOUR_SUDO_USER
# 2) Locate your installed weblogic domain start file
find / -name startManagedWebLogic.sh -type f -print 2>/dev/null
#or if you use mlocate
locate startManagedWebLogic.sh
## After a while this command should print something like :
##/YOUR_SUDO_USER/weblogic/user_projects/domains/YOUR_DOMAIN/bin/startManagedWebLogic.sh
--Audit Trail
-- SQL Query to provide detail audit trail via SQL (useful when a flowtrace can't be open)
-- SQL to get bpel ECID from ID Demande :
select ECID, ID, composite_dn
from soa_user.composite_instance
where title ='&BUSINESS_DEFINED_ID'
order by created_time desc;
--SQL to get detailed status of a bpel instance and his ECID Replace Flowtrace
--Performance/Development Action
--Script to mass abort all running instances. (Usefull during perf testing to keep volumetry between runs)
update YOUR_YOUR_SOA_USER.composite_instance set state=16 where state=32;
update YOUR_YOUR_SOA_USER.work_item set state = 10, modify_date = sysdate where state<5;
update YOUR_YOUR_SOA_USER.cube_instance ci set ci.state = 8 ,
ci.scope_revision = (select cit.scope_revision+1 from YOUR_YOUR_SOA_USER.cube_instance cit where cit.ecid = ci.ecid) ,
ci.modify_date = sysdate where ci.state < 4;
update YOUR_YOUR_SOA_USER.dlv_message set state = 3 where state in (0, 2);
update YOUR_YOUR_SOA_USER.dlv_subscription set state = -1 where state=0;
COMMIT;
--Change this variable for your purge date value. In this case the Bpel purge purge all instance older than &purgeDays days
DECLARE purgeDays number := 72;
--TroubleShooting BPEL Purge
--Not purged instances
SELECT
ci.ecid AS ecid,
decode(ci.state,0, 'STATE_INITIATED(NOK)',1,'STATE_OPEN_RUNNING(OK)',2,'STATE_OPEN_SUSPENDED(OK)',3,'STATE_OPEN_FAULTED(OK)',4,'STATE_CLOSED_PENDING_CANCEL(OK)',5,'STATE_CLOSED_COMPLETED(NOK)',6,'STATE_CLOSED_FAULTED(NOK)', 7, 'STATE_CLOSED_CANCELLED(NOK)', 8, 'STATE_CLOSED_ABORTED(NOK)', 9, 'STATE_CLOSED_STALE(NOK)', 10, 'STATE_CLOSED_ROLLED_BACK(NOK)') AS state,
ci.composite_name AS composite_name,
ci.composite_revision AS composite_revision,
--------------------------------------------------------
-- MIT License
-- Author Cedric Leruth
--
--Permission is hereby granted, free of charge, to any person obtaining a copy
--of this software and associated documentation files (the "Software"), to deal
--in the Software without restriction, including without limitation the rights
--to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
--copies of the Software, and to permit persons to whom the Software is
--furnished to do so, subject to the following conditions:
--Key BPEL Indicator (usefull to build a monitoring system with EM or Kibana, etc)
-- Replace soa_user with your own Oracle SOA Database Schema user
--Indentify bpel errors in the last 10 minutes
select ci.title, ci.ecid, cui.composite_name, cui.composite_revision, ci.created_time,
(SELECT count(1) FROM soa_user.REFERENCE_INSTANCE ri WHERE ri.ecid = ci.ecid and error_message is not null) +
(select count(1) from soa_user.bpel_faults_vw bf where bf.ecid = ci.ecid) as nbfaults
from soa_user.composite_instance ci
inner join soa_user.cube_instance cui on cui.ecid = ci.ecid
where (select count(1) from soa_user.bpel_faults_vw bf where bf.ecid = ci.ecid) !=0
and ci.created_time >= sysdate - 10/(24*60);
<!--fault-bindings.xml-->
<?xml version="1.0" encoding="UTF-8"?>
<faultPolicyBindings version="2.0.2"
xmlns="http://schemas.oracle.com/bpel/faultpolicy"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<composite faultPolicy="Faults_Policy"/>
</faultPolicyBindings>
# Maven package Java
# Build your Java project
# Add steps that analyze code, save build artifacts, deploy, and more:
# https://docs.microsoft.com/azure/devops/pipelines/languages/java
trigger:
- master
variables:
# Agent VM image name
<?php
//Add the following in your custom plugin code
//Note: if you prefer to add it in the function.php remove the array : add_filter('wp_nav_menu_args', 'display_custom_menu');
add_filter('wp_nav_menu_args', array($this,'display_custom_menu'));
/**
* Filter menu to display
* logged-in menu if user is logged in
* logged-in-admin menu if user is logged in and is an Administrator
* logged-out menu if visitor isn't logged in