[SOLVED]zsh and variables?
hello,
is there possibility to export global(local) variables with spaces between names?
now my shell only export first part of variable, to space
regards
Last edited by falomir (2009-08-18 04:33:00)
--> zsh
--> export test=$(echo one two three)
--> echo $test
one
--> export test="$(echo one two three)"
--> echo $test
one two three
--> bash
--> export test=$(echo one two three)
--> echo $test
one two three
--> exit
A bug maybe?
var=$(..) should work without quotes
--> test=$(echo one two three)
--> export test
--> echo $test
one two three
Similar Messages
-
[SOLVED]ZSH and regular expressions
Hi
I am getting into regular expressions and i have noticed that with my .zshrc file i have some problem. In bash this expression works:
\^\[^#]
but not also in zsh. I have also noted that regular expression works fine with other zshrc configurations found in archwiki (like grml) but i want to have my configuration. And i really can't find what command make a difference
My .zshrc file is pulled from this site https://github.com/slashbeast/things/bl … s/DOTzshrc.
# .zshrc
# Author: Piotr Karbowski <[email protected]>
# License: beerware.
# Basic zsh config.
umask 077
ZDOTDIR=${ZDOTDIR:-${HOME}}
ZSHDDIR="${HOME}/.config/zsh.d"
HISTFILE="${ZDOTDIR}/.zsh_history"
HISTSIZE='10000'
SAVEHIST="${HISTSIZE}"
export EDITOR="/usr/bin/vim"
export TMP="$HOME/tmp"
export TEMP="$TMP"
export TMPDIR="$TMP"
export TMPPREFIX="${TMPDIR}/zsh"
if [ ! -d "${TMP}" ]; then mkdir "${TMP}"; fi
if ! [[ "${PATH}" =~ "^${HOME}/bin" ]]; then
export PATH="${HOME}/bin:${PATH}"
fi
# Not all servers have terminfo for rxvt-256color. :<
if [ "${TERM}" = 'rxvt-256color' ] && ! [ -f '/usr/share/terminfo/r/rxvt-256color' ] && ! [ -f '/lib/terminfo/r/rxvt-256color' ] && ! [ -f "${HOME}/.terminfo/r/rxvt-256color" ]; then
export TERM='rxvt-unicode'
fi
# Colors.
red='\e[0;31m'
RED='\e[1;31m'
green='\e[0;32m'
GREEN='\e[1;32m'
yellow='\e[0;33m'
YELLOW='\e[1;33m'
blue='\e[0;34m'
BLUE='\e[1;34m'
purple='\e[0;35m'
PURPLE='\e[1;35m'
cyan='\e[0;36m'
CYAN='\e[1;36m'
NC='\e[0m'
# Functions
if [ -f '/etc/profile.d/prll.sh' ]; then
. "/etc/profile.d/prll.sh"
fi
run_under_tmux() {
# Run $1 under session or attach if such session already exist.
# $2 is optional path, if no specified, will use $1 from $PATH.
# If you need to pass extra variables, use $2 for it as in example below..
# Example usage:
# torrent() { run_under_tmux 'rtorrent' '/usr/local/rtorrent-git/bin/rtorrent'; }
# mutt() { run_under_tmux 'mutt'; }
# irc() { run_under_tmux 'irssi' "TERM='screen' command irssi"; }
# There is a bug in linux's libevent...
# export EVENT_NOEPOLL=1
command -v tmux >/dev/null 2>&1 || return 1
if [ -z "$1" ]; then return 1; fi
local name="$1"
if [ -n "$2" ]; then
local file_path="$2"
else
local file_path="command ${name}"
fi
if tmux has-session -t "${name}" 2>/dev/null; then
tmux attach -d -t "${name}"
else
tmux new-session -s "${name}" "${file_path}" \; set-option status \; set set-titles-string "${name} (tmux@${HOST})"
fi
t() { run_under_tmux rtorrent; }
irc() { run_under_tmux irssi "TERM='screen' command irssi"; }
over_ssh() {
if [ -n "${SSH_CLIENT}" ]; then
return 0
else
return 1
fi
reload () {
exec "${SHELL}" "$@"
confirm() {
local answer
echo -ne "zsh: sure you want to run '${YELLOW}$@${NC}' [yN]? "
read -q answer
echo
if [[ "${answer}" =~ ^[Yy]$ ]]; then
command "${=1}" "${=@:2}"
else
return 1
fi
confirm_wrapper() {
if [ "$1" = '--root' ]; then
local as_root='true'
shift
fi
local runcommand="$1"; shift
if [ "${as_root}" = 'true' ] && [ "${USER}" != 'root' ]; then
runcommand="sudo ${runcommand}"
fi
confirm "${runcommand}" "$@"
poweroff() { confirm_wrapper --root $0 "$@"; }
reboot() { confirm_wrapper --root $0 "$@"; }
hibernate() { confirm_wrapper --root $0 "$@"; }
detox() {
if [ "$#" -ge 1 ]; then
confirm detox "$@"
else
command detox "$@"
fi
has() {
local string="${1}"
shift
local element=''
for element in "$@"; do
if [ "${string}" = "${element}" ]; then
return 0
fi
done
return 1
begin_with() {
local string="${1}"
shift
local element=''
for element in "$@"; do
if [[ "${string}" =~ "^${element}" ]]; then
return 0
fi
done
return 1
termtitle() {
case "$TERM" in
rxvt*|xterm|nxterm|gnome|screen|screen-*)
local prompt_host="${(%):-%m}"
local prompt_user="${(%):-%n}"
local prompt_char="${(%):-%~}"
case "$1" in
precmd)
printf '\e]0;%s@%s: %s\a' "${prompt_user}" "${prompt_host}" "${prompt_char}"
preexec)
printf '\e]0;%s [%s@%s: %s]\a' "$2" "${prompt_user}" "${prompt_host}" "${prompt_char}"
esac
esac
git_check_if_worktree() {
# This function intend to be only executed in chpwd().
# Check if the current path is in git repo.
# We would want stop this function, on some big git repos it can take some time to cd into.
if [ -n "${skip_zsh_git}" ]; then
git_pwd_is_worktree='false'
return 1
fi
# The : separated list of paths where we will run check for git repo.
# If not set, then we will do it only for /root and /home.
if [ "${UID}" = '0' ]; then
# running 'git' in repo changes owner of git's index files to root, skip prompt git magic if CWD=/home/*
git_check_if_workdir_path="${git_check_if_workdir_path:-/root:/etc}"
else
git_check_if_workdir_path="${git_check_if_workdir_path:-/home}"
git_check_if_workdir_path_exclude="${git_check_if_workdir_path_exclude:-${HOME}/_sshfs}"
fi
if begin_with "${PWD}" ${=git_check_if_workdir_path//:/ }; then
if ! begin_with "${PWD}" ${=git_check_if_workdir_path_exclude//:/ }; then
local git_pwd_is_worktree_match='true'
else
local git_pwd_is_worktree_match='false'
fi
fi
if ! [ "${git_pwd_is_worktree_match}" = 'true' ]; then
git_pwd_is_worktree='false'
return 1
fi
# todo: Prevent checking for /.git or /home/.git, if PWD=/home or PWD=/ maybe...
# damn annoying RBAC messages about Access denied there.
if [ -d '.git' ] || [ "$(git rev-parse --is-inside-work-tree 2> /dev/null)" = 'true' ]; then
git_pwd_is_worktree='true'
git_worktree_is_bare="$(git config core.bare)"
else
unset git_branch git_worktree_is_bare
git_pwd_is_worktree='false'
fi
git_branch() {
git_branch="$(git symbolic-ref HEAD 2>/dev/null)"
git_branch="${git_branch##*/}"
git_branch="${git_branch:-no branch}"
git_dirty() {
if [ "${git_worktree_is_bare}" = 'false' ] && [ -n "$(git status --untracked-files='no' --porcelain)" ]; then
git_dirty='%F{green}*'
else
unset git_dirty
fi
precmd() {
# Set terminal title.
termtitle precmd
if [ "${git_pwd_is_worktree}" = 'true' ]; then
git_branch
git_dirty
git_prompt=" %F{blue}[%F{253}${git_branch}${git_dirty}%F{blue}]"
else
unset git_prompt
fi
preexec() {
# Set terminal title along with current executed command pass as second argument
termtitle preexec "${(V)1}"
chpwd() {
git_check_if_worktree
man() {
if command -v vimmanpager >/dev/null 2>&1; then
PAGER="vimmanpager" command man "$@"
else
command man "$@"
fi
# Are we running under grsecurity's RBAC?
rbac_auth() {
local auth_to_role='admin'
if [ "${USER}" = 'root' ]; then
if ! grep -qE '^RBAC:' "/proc/self/status" && command -v gradm > /dev/null 2>&1; then
echo -e "\n${BLUE}*${NC} ${GREEN}RBAC${NC} Authorize to '${auth_to_role}' RBAC role."
gradm -a "${auth_to_role}"
fi
fi
#rbac_auth
# Check if we started zsh in git worktree, useful with tmux when your new zsh may spawn in source dir.
git_check_if_worktree
if [ "${git_pwd_is_worktree}" = 'true' ]; then
git_branch
git_dirty
git_prompt=" %F{blue}[%F{253}${git_branch}${git_dirty}%F{blue}]"
else
unset git_prompt
fi
# Le features!
# extended globbing, awesome!
setopt extendedGlob
# zmv - a command for renaming files by means of shell patterns.
autoload -U zmv
# zargs, as an alternative to find -exec and xargs.
autoload -U zargs
# Turn on command substitution in the prompt (and parameter expansion and arithmetic expansion).
setopt promptsubst
# Control-x-e to open current line in $EDITOR, awesome when writting functions or editing multiline commands.
autoload -U edit-command-line
zle -N edit-command-line
bindkey '^x^e' edit-command-line
# Include user-specified configs.
if [ ! -d "${ZSHDDIR}" ]; then
mkdir -p "${ZSHDDIR}" && echo "# Put your user-specified config here." > "${ZSHDDIR}/example.zsh"
fi
for zshd in $(ls -A ${HOME}/.config/zsh.d/^*.(z)sh$); do
. "${zshd}"
done
# Completion.
autoload -Uz compinit
compinit
zstyle ':completion:*' matcher-list 'm:{a-z}={A-Z}'
zstyle ':completion:*' completer _expand _complete _ignored _approximate
zstyle ':completion:*' menu select=2
zstyle ':completion:*' select-prompt '%SScrolling active: current selection at %p%s'
zstyle ':completion::complete:*' use-cache 1
zstyle ':completion:*:descriptions' format '%U%F{cyan}%d%f%u'
# If running as root and nice >0, renice to 0.
if [ "$USER" = 'root' ] && [ "$(cut -d ' ' -f 19 /proc/$$/stat)" -gt 0 ]; then
renice -n 0 -p "$$" && echo "# Adjusted nice level for current shell to 0."
fi
# Fancy prompt.
if over_ssh && [ -z "${TMUX}" ]; then
prompt_is_ssh='%F{blue}[%F{red}SSH%F{blue}] '
elif over_ssh; then
prompt_is_ssh='%F{blue}[%F{253}SSH%F{blue}] '
else
unset prompt_is_ssh
fi
case $USER in
root)
PROMPT='%B%F{cyan}%m%k %(?..%F{blue}[%F{253}%?%F{blue}] )${prompt_is_ssh}%B%F{blue}%1~${git_prompt}%F{blue} %# %b%f%k'
PROMPT='%B%F{blue}%n@%m%k %(?..%F{blue}[%F{253}%?%F{blue}] )${prompt_is_ssh}%B%F{cyan}%1~${git_prompt}%F{cyan} %# %b%f%k'
esac
# Ignore lines prefixed with '#'.
setopt interactivecomments
# Ignore duplicate in history.
setopt hist_ignore_dups
# Prevent record in history entry if preceding them with at least one space
setopt hist_ignore_space
# Nobody need flow control anymore. Troublesome feature.
#stty -ixon
setopt noflowcontrol
# Fix for tmux on linux.
case "$(uname -o)" in
'GNU/Linux')
export EVENT_NOEPOLL=1
esac
# Aliases
alias cp='cp -iv'
alias rcp='rsync -v --progress'
alias rmv='rsync -v --progress --remove-source-files'
alias mv='mv -iv'
alias rm='rm -iv'
alias rmdir='rmdir -v'
alias ln='ln -v'
alias chmod="chmod -c"
alias chown="chown -c"
if command -v colordiff > /dev/null 2>&1; then
alias diff="colordiff -Nuar"
else
alias diff="diff -Nuar"
fi
alias grep='grep --colour=auto'
alias egrep='egrep --colour=auto'
alias ls='ls --color=auto --human-readable --group-directories-first --classify'
# Keys.
case $TERM in
rxvt*|xterm*)
bindkey "^[[7~" beginning-of-line #Home key
bindkey "^[[8~" end-of-line #End key
bindkey "^[[3~" delete-char #Del key
bindkey "^[[A" history-beginning-search-backward #Up Arrow
bindkey "^[[B" history-beginning-search-forward #Down Arrow
bindkey "^[Oc" forward-word # control + right arrow
bindkey "^[Od" backward-word # control + left arrow
bindkey "^H" backward-kill-word # control + backspace
bindkey "^[[3^" kill-word # control + delete
linux)
bindkey "^[[1~" beginning-of-line #Home key
bindkey "^[[4~" end-of-line #End key
bindkey "^[[3~" delete-char #Del key
bindkey "^[[A" history-beginning-search-backward
bindkey "^[[B" history-beginning-search-forward
screen|screen-*)
bindkey "^[[1~" beginning-of-line #Home key
bindkey "^[[4~" end-of-line #End key
bindkey "^[[3~" delete-char #Del key
bindkey "^[[A" history-beginning-search-backward #Up Arrow
bindkey "^[[B" history-beginning-search-forward #Down Arrow
bindkey "^[Oc" forward-word # control + right arrow
bindkey "^[Od" backward-word # control + left arrow
bindkey "^H" backward-kill-word # control + backspace
bindkey "^[[3^" kill-word # control + delete
esac
bindkey "^R" history-incremental-pattern-search-backward
bindkey "^S" history-incremental-pattern-search-forward
if [ -f ~/.alert ]; then cat ~/.alert; fi
Thanks for all the help.
Last edited by Shark (2013-05-11 22:32:24)Raynman wrote:
"This expression doesn't work", "It doesn't work" ...
Could you try being a bit more specific?
Firstly, i am sorry i didn't post the output. I should have know better.
Secondly, chill out.
I have used above regex with grep command. Output from terminal is:
zsh: bad pattern: ^[^#]
In bash it works perfectly.
If i issue "setopt re_match_pcre" i have the same ouput as above.
EDIT: If i issue "unsetopt no_match" it actually works but i have to change the regex from "\^\[^#]" to "\^[^#]" otherwise i get the same output as above. In bash both options work.
Last edited by Shark (2013-05-11 22:07:21) -
[Solved] zsh and pkexec
[Synopsys] Edit /etc/shells manually, and add /bin/zsh to the list of shells and specify the full path to the app in the policy file. i.e. /usr/bin/leafpad and NOT just leafpad. The policy file for gparted serves as a good one to model your own policy files after.
My environment variable SHELL is still being set to /bin/zsh even though binaries have been moved to /usr/bin/zsh making pkexec complain and fail to run apps in privileged mode.
Where is SHELL set and where would be the most appropriate place to fix it globally for all users?
Last edited by KairiTech (2013-06-29 20:53:49)karol wrote:What exactly does pkexec say?
The value for the SHELL variable was not found the /etc/shells file
This incident has been reported.
...but if I set SHELL like so...
export SHELL=`which zsh` ; pkexec gnome-system-monitor !
...after I enter a password the error message changes to...
(process:9562): GLib-WARNING **: GChildWatchSource: Exit status of a child process was requested but ECHILD was received by waitpid(). Most likely the process is ignoring SIGCHLD, or some other thread is invoking waitpid() with a nonpositive first argument; either behavior can break applications that use g_child_watch_add()/g_spawn_sync() either directly or indirectly.
==== AUTHENTICATION COMPLETE ===
(gnome-system-monitor:9562): Gtk-WARNING **: cannot open display:
Last edited by KairiTech (2013-06-29 17:40:34) -
[SOLVED] Zsh and the move to /usr/bin
I've done everything in the article, and I have no unofficial packages.
However, I do use zsh as my shell, so I thought I might as well ask before doing anything:
Blog wrote:# pacman -Syu --ignore filesystem,bash
# pacman -S bash
# pacman -Su
Should I replace bash with zsh here? I do have both bash and zsh installed.
EDIT: I did indeed forget to mount /boot. After doing that the update worked perfectly.
Last edited by graph (2013-06-03 19:23:37)Alright, I have one working shell. I have no Ignores but I do have
HoldPkg = pacman glibc
in /etc/pacman.conf - Could this be the culprit?
Also, here are the (missing) output of the commands from the article. I'm quite interested in knowing whether all my autofs-partitions are mounted, which I believe they are.
# pacman -Qqo /bin /sbin /usr/sbin | pacman -Qm -
# find /bin /sbin /usr/sbin -exec pacman -Qo -- {} + >/dev/null
# mount
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
sys on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
dev on /dev type devtmpfs (rw,nosuid,relatime,size=1538736k,nr_inodes=216743,mode=755)
run on /run type tmpfs (rw,nosuid,nodev,relatime,mode=755)
/dev/sda5 on / type ext4 (rw,relatime,data=ordered)
securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
tmpfs on /sys/fs/cgroup type tmpfs (rw,nosuid,nodev,noexec,mode=755)
cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,xattr,release_agent=/usr/lib/systemd/systemd-cgroups-agent,name=systemd)
pstore on /sys/fs/pstore type pstore (rw,nosuid,nodev,noexec,relatime)
cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,nosuid,nodev,noexec,relatime,cpuset)
cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,cpuacct,cpu)
cgroup on /sys/fs/cgroup/memory type cgroup (rw,nosuid,nodev,noexec,relatime,memory)
cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,devices)
cgroup on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,freezer)
cgroup on /sys/fs/cgroup/net_cls type cgroup (rw,nosuid,nodev,noexec,relatime,net_cls)
cgroup on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,blkio)
systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=33,pgrp=1,timeout=300,minproto=5,maxproto=5,direct)
systemd-1 on /boot type autofs (rw,relatime,fd=36,pgrp=1,timeout=300,minproto=5,maxproto=5,direct)
systemd-1 on /home type autofs (rw,relatime,fd=37,pgrp=1,timeout=300,minproto=5,maxproto=5,direct)
configfs on /sys/kernel/config type configfs (rw,relatime)
debugfs on /sys/kernel/debug type debugfs (rw,relatime)
mqueue on /dev/mqueue type mqueue (rw,relatime)
tmpfs on /tmp type tmpfs (rw)
hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime)
/dev/sda6 on /home type ext4 (rw,noatime,data=ordered)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,relatime)
Last edited by graph (2013-06-03 18:00:47) -
[SOLVED] problem with zsh and urxvt and keybinding
I hope this is the right forum to post this problem, else please move it to the right forum.
I have zsh and urxvt installed and I am quite pleased with it, except for one problem,
When I push the delete button in urxvt I get a ~ instead of deleting the next character. In aterm and xterm I don't have this problem.
I'm sure that there is a way to make the right keybinding for this, but I can't find the solution. Is there someone who can point me in the right direction?
Last edited by NeoXP (2009-02-24 21:00:02)These are my most current bindkeys...
case $TERM in (rxvt*) #urxvt
bindkey "\e[7~" beginning-of-line
bindkey "\e[8~" end-of-line
esac
bindkey "^A" beginning-of-line
bindkey "^E" end-of-line
bindkey '^?' backward-delete-char
bindkey "\e[3~" delete-char
Open a terminal, hit ctrl-V, and press delete. It should print the key generated. The first ^[ is escaped as \e.
So, on my terminal I see ^[[3~
I put bindkey "\e[3~" delete-char in my ~/.zshrc, and there you go. -
Zsh (and Bash) Backgrounds Refuse to Change Color [SOLVED]
I'm sorry if this sounds like a stupid question, but here goes.
I installed Arch about a week ago and decided that I wanted to change the color of the terminal. I followed the guide on the Arch Wiki, (https://wiki.archlinux.org/index.php/Color_Bash_Prompt), creating all of the necessary files and copy-and-pasting all of the given text into those files. When I restarted my terminal, nothing happened. Fed up, I tried installing Zsh + oh-my-zsh. I successfully installed the two and installed a zsh theme, but the background color still does not change. The text color, however, changes to the appopriate colors, but the background color remains white.
Can anyone please tell me what I'm doing wrong?
Edit: I didn't specify, but I really don't care which terminal I end up using, just as long as the colors work.
Last edited by Thermite (2012-12-19 01:23:20)zsh and bash are shells, not terminal emulators. There is no "default" terminal, if you're using Arch. You had to install a terminal emulator at some point. Or maybe if you followed the beginner's guide you're using xterm. What window manager are you using?
There are ways to set the background color in rxvt and in xterm using your .Xresources file. Look at the wiki topic for each of those terminals for more information.
Maybe an easier method for you would be to install a terminal emulator that has menu support, like Terminator, LXTerminal, or Sakura. Then you can just right-click in the terminal and use the menu to set the background color and opacity.
Last edited by 2ManyDogs (2012-12-18 23:03:53) -
Human tasks, complex types and variable assignment.
Hi folks,
I encountered a problem while working with 10.1.3.1 which I haven't managed to solve yet and would be grateful for assistance. I have defined a complex data type (just a sequence of strings) and want to fill that data type by going through a flow of screens, e.g. through several human tasks. I have defined that type as a variable to the BPEL process and have managed to assign simple expressions to the variable and pass that into a Human Task. In the task I see now a simple input form for all attributes of the type.
Now the problem. After I fill out the form and complete the human task, I have
The global variable:
<outputVariable>
<part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="payload">
<MyProcessResponse xmlns="http://xmlns.oracle.com/VacationRequest">
<vorname/>
<nachname/>
<strasse/>
<nummer/>
<postleitzahl/>
<stadt/>
<maximaleDauer/>
<minimaleDauer/>
</MyProcessResponse>
</part>
</outputVariable>
and the return value from the human task:
<task>
<title>CaptureData</title>-
<payload>
<MyProcessResponse>
<vorname>David</vorname>
<nachname>Beckham</nachname>
<strasse>HighStreet</strasse>
<nummer/>
<postleitzahl/>
<stadt/>
<maximaleDauer/>
<minimaleDauer/>
</MyProcessResponse>
</payload>
</task>
Now the only thing I would like to do is to replace the original values in the variable with the new values that have been returned from the task, this should be performed in an extra assign step. Sounds simple. JDeveloper wouldn't even let me klick through the return value from the HumanTask, so it seems as if I have to do things manually.
These are my tries:
Command 1:
<copy>
<from variable="CaptureData_1_globalVariable"
part="payload" query="/task:task/task:payload" />
<to variable="outputVariable" part="payload"
query="/ns1:MyProcessResponse"/>
</copy>
Result 1:
<outputVariable>
<part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="payload">
<ns0:MyProcessResponse xmlns="http://xmlns.oracle.com/bpel/workflow/task" xmlns:ns0="http://xmlns.oracle.com/VacationRequest">
<MyProcessResponse xmlns="http://xmlns.oracle.com/VacationRequest">
<vorname>David</vorname>
<nachname>Beckham</nachname>
<strasse>HighStreet</strasse>
<nummer/>
<postleitzahl/>
<stadt/>
<maximaleDauer/>
<minimaleDauer/>
</MyProcessResponse>
</ns0:MyProcessResponse>
</part>
</outputVariable>
--> There is one MyProcessResponse element too many
Command 2:
<copy>
<from variable="CaptureData_1_globalVariable"
part="payload" query="/task:task/task:payload"/>
<to variable="outputVariable" part="payload"
query="/ns1:MyProcessResponse/ns1:vorname"/>
</copy>
Result 2:
<outputVariable>
<part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="payload">
<MyProcessResponse xmlns="http://xmlns.oracle.com/VacationRequest">
<ns0:vorname xmlns="http://xmlns.oracle.com/bpel/workflow/task" xmlns:ns0="http://xmlns.oracle.com/VacationRequest">
<MyProcessResponse xmlns="http://xmlns.oracle.com/VacationRequest">
<vorname>David</vorname>
<nachname>Beckham</nachname>
<strasse>HighStreet</strasse>
<nummer/>
<postleitzahl/>
<stadt/>
<maximaleDauer/>
<minimaleDauer/>
</MyProcessResponse>
</ns0:vorname>
<nachname/>
<strasse/>
<nummer/>
<postleitzahl/>
<stadt/>
<maximaleDauer/>
<minimaleDauer/>
</MyProcessResponse>
</part>
</outputVariable>
--> This was moreless expected, since I tried to copy the stuff to some wrong place.
Command 3:
<copy>
<from variable="CaptureData_1_globalVariable"
part="payload" query="/task:task/task:payload/ns0:MyProcessResponse"/>
<to variable="outputVariable" part="payload"
query="/ns1:MyProcessResponse"/>
</copy>
Result 3:
--> Task does't return (!!!). In the BPEL Worklist, the task is completed, however in the BPEL console it still apears as "waiting to return from Human task".
Does anyone have a hint on how to copy the values so that I get exactly the structure that I printed at the very top?
Thanks for help. Rock On !Hello everyone,
It seems that we are talking about different things, I am afraid. Let me describe the scenario once again:
- I want to have a BPEL process with more than one role involved
- This process should be used to gather some complex data.
- All data gathering should be done through HumanTasks.
So I defined an xsd complex type, that contains a sequence of fields. This complex type should be part of the process payload.
Now before HumanTask 1 is called, I copy the contents of this variable into the input for tasks1. This works fine and I see the appropriate values, when opening the Human Task in the BPEL worklist application.
Now after HumanTask1 is completed, the values I entered inside that tasks are returned as a variable from the HumanTask. My problem is, that I cannot copy the contents of the task back into the main process. With simpleTypes this is relatively ok, since Jdev supports the assembling of the copy operation, however for complex tasks it fails.
A typical scenario for this would be where e.g. a customer fills a shipping address and afterwards a store staff fills product details in the same order. In Java this could be solved via "pass by reference". Who can provide an example? -
Overview report cost estimate (fix and variable)
Hello
anybody knows a overview report where i can see for the current valid cost estimates
per material
costs splitt between fix and variable costs
Alternatively it would be sufficient if this is just shown for a costing run
In CK40N and all other reports i know i have the complete costs but to see details an extra click to the between fix and variable costs is needed and i can not extract to excel.
Or is the only option an query on KEKO,KEPH, CKIS?
Cheers
TimHello
@Sachin: Thanks for the report but the output is not that good - but helpful
@Eric: Thanks this report solved my problem )
Cheers
Tim -
Fixed and variable cost component break up in PCA
Hi,
Is it possible to get fixed and variable cost component break up and contribution report in PCA at each product group level and lower level of node. I think this requires development. As my client requires the report to have cost break up into fixed and variable in PCA at each line item level. Can anyone solve thisHello
You can get the report by using the report painter, no development will be required.
Regards
Madhav -
1v-5v output linearly by using 5v supply, voltage divider and variable resister
How can i get 1v-5v output linearly by using 5v supply, voltage divider and variable resister ?
"SB02"
Solved!
Go to Solution.Do you have it wired like the attached file? Using my schematic, you can calculate the current through the pot based on the desired voltage drop across the pot
4V / 10Kohm = 0.0004 A
From Kirchhoff's current law, we know the same current will flow through the circuit so now we can calculate the lower leg of the divider based on the current and the desired voltage drop across the resistor
1V / 0.0004 A = 2.5K Ohm
My schematic keeps the current through the circuit constant so the voltage divider should never change. Assuming a linear pot, you will get a linear voltage swing as measured at the wiper. If you wired the pot a different way, then more then likely, you are changing the total resistance from 5V to ground which would effect the current which would effect the voltages.
Attachments:
divider.JPG 48 KB -
Difference between Temp table and Variable table and which one is better performance wise?
Hello,
Anyone could you explain What is difference between Temp Table (#, ##) and Variable table (DECLARE @V TABLE (EMP_ID INT)) ?
Which one is recommended to use for better performance?
also Is it possible to create CLUSTER and NONCLUSTER Index on Variable table?
In my case: 1-2 days transactional data are more than 3-4 Millions. I tried using both # and table variable and found table variable is faster.
Is that Table variable using Memory or Disk space?
Thanks Shiven:) If Answer is Helpful, Please VoteCheck following link to see differences b/w TempTable & TableVariable: http://sqlwithmanoj.com/2010/05/15/temporary-tables-vs-table-variables/
TempTables & TableVariables both use memory & tempDB in similar manner, check this blog post: http://sqlwithmanoj.com/2010/07/20/table-variables-are-not-stored-in-memory-but-in-tempdb/
Performance wise if you are dealing with millions of records then TempTable is ideal, as you can create explicit indexes on top of them. But if there are less records then TableVariables are good suited.
On Tables Variable explicit index are not allowed, if you define a PK column, then a Clustered Index will be created automatically.
But it also depends upon specific scenarios you are dealing with , can you share it?
~manoj | email: http://scr.im/m22g
http://sqlwithmanoj.wordpress.com
MCCA 2011 | My FB Page -
Fixed and Variable Breakup of Actual Cost
We have implemented Material ledger and also activated actual cost component split. We are getting the actual product cost at month end. In the costing cockpit we get the Peiodic unit price(Actual cost) as well as std price of the material. But In costing cockpit we are not able to get the breakup of Fixed and variable. Whereas we are getting Fixed and varible breakup when we check cost component report in ckm3. But there, we can see individual material wise fixed and varibale breakup.
Can anybody help me so that I can see the Actual Fixed and variable cost for all the products at a time?
With regards
Mukesh PoddarFixed price, is the fixed costs - I usually see it in relation to Overhead..
Fixed costs remain, whether you manufacutre or not.
Say you are deciding whether to out-source an assembly, If you outsource, VARIABLE cost will be saved, Material, labor for that assembly, Overhead representing fringes for that labor, the electricity to run that specific machine. However, you will still have fixed costs of: Management Salary (although some of that can be variable); insurance on the building; heating and cooling for the building; realestate taxes.
If the cost to make "in house" is 150 each and the vendor is going to charge you 100, thi is only a true saving if your fixed costs are less than 50.
SAP allows you to separate fixed and variable costs so that you do make/buy analysis, budgeting, etc
Hope this helps
Edited by: Althea Madigan on May 12, 2010 2:11 PM -
SOAP Use Adapter-Specific Message Properties and Variable Transport Binding
Hi Friends,
I am new to use to Soap Adapter. Please help me out bellow doubts.
1.When you use Use Adapter-Specific Message Properties and Variable Transport Binding .
2. Where exactly we r using below parameters.
Remote User : (technical name: SRemoteUser )
Remote Host : (technical name: SRemoteHost )
SOAP Action (technical name: SHeaderSOAPACTION )
To transfer further header fields, set the relevant indicator. You can then store the following attributes and their values in the XI message header:
Variable Header : (technical name: XHeaderName1 )
Variable Header : (technical name: XHeaderName2 )
Variable Header : (technical name: XHeaderName3 )
Thanks&Regards
G.BhanuprakashHi,
1.When you use Use Adapter-Specific Message Properties and Variable Transport Binding .
SAP Help says both are needed to be checked when you want to process adapter attributes
Configuring the Receiver SOAP Adapter - SAP NetWeaver Exchange Infrastructure - SAP Library
These attributes can be get/set using dynamic configuration and their technical names are what you have pasted:
Remote User : (technical name: SRemoteUser )
Remote Host : (technical name: SRemoteHost )
SOAP Action (technical name: SHeaderSOAPACTION )
To transfer further header fields, set the relevant indicator. You can then store the following attributes and their values in the XI message header:
Variable Header : (technical name: XHeaderName1 )
Variable Header : (technical name: XHeaderName2 )
Variable Header : (technical name: XHeaderName3 )
Remote User - the username used to send a message to the adapter engine using SOAP
Remote Host - hostname which the remote user used
SOAP Action - SOAP Action of the XI webservice (sender) / SOAP Action of the receiver webservice
Variable Headers are additional key-value pairs in the HTTP Header that could be accessed in the XI Header using dynamic configuration. The limit is only three though.
Regards,
Mark -
Hello,
I want to install Photoshop but everytime I get an ERROR CODE: A12E1.How do I solve that and what is it?A12E1 error installing Creative Cloud products | CC
Mylenium -
Budget Report to show the fixed and variable split for Materials
Hello Gurus,
Could you tell me if there is a budget standards report that will show the fixed and variable split for Materials? Example: Labor, Equip., QC and Overheads?
I need it for the correctly rolled-up 'final material number' step. The report that does this now (without fixed and var split) is the Indented BOM Comparison (sret - cost mgmt-product costing - cost mgmt-customized reports - cost estimate comparison - costed multilevel compare rpt - Indented BOM Comparison).
Thanks,
Jeffersonone simple way is in your final itab declare a slno type i field
data : begin of itab occurs 0,
slno type i,
<other fields>
end of itab.
after filling the data in itab.
loop at itab.
itab-slno = sy-tabix.
modify itab.
endloop.
in fieldcatalog also you have to define that slno field as the first column.
but it will change its order if you are sorting the output or filtering the output.
regards
shiba dutta
Maybe you are looking for
-
Satellite A55 won't boot from CD
A friend gave me a Satellite A55 for my daughter. It was working for him until it started making a screeching noise. I determined that to be the HDD - it stopped when I removed it! Dropped in another HDD from an other laptop, but it won't boot. That
-
ITunes and Quicktime downgrading...
Hi there... I have a G4 and am using OSX 10.3.9. This is my Pro-Tools computer as I have an older version of ProTools that doesn't run on 10.4 or upwards. So... The story so far. I updated my computer with the more recent versions of iTunes and Quick
-
I have been confused by the alias for a long time that in the URL request syntax for servlet(in the OC4J for 9iAS Reports Services Server). The alias in the URL of http://<server_name>.<domain>:<port>/<alias>/rwservlet?<param> is however, seems alway
-
Mail and Home Folder Weirdness (longish)
Hi all Running 10.4.10 Server with User Homes on a second drive in the server machine. Here's a bunch of symptoms that I don't understand. It was a sequence of events and any guidance on what might be happening would be appreciated. First thing repor
-
Boot times...
I haven't seen any (that doesn't mean they aren't there) boot times. So, how long does it take your config to boot? (post config)